RuneHive-Game
Loading...
Searching...
No Matches
SendURL.java
Go to the documentation of this file.
1package com.runehive.net.packet.out;
2
3import com.runehive.net.packet.OutgoingPacket;
4import com.runehive.net.packet.PacketType;
5import com.runehive.game.world.entity.mob.player.Player;
6
7/**
8 * The {@code OutgoingPacket} that opens a URL from client.
9 *
10 * @author Daniel | Obey
11 */
12public class SendURL extends OutgoingPacket {
13
14 private final String link;
15
16 public SendURL(String link) {
17 super(138, PacketType.VAR_BYTE);
18 this.link = link;
19 }
20
21 @Override
22 public boolean encode(Player player) {
23 builder.writeString(link);
24 return true;
25 }
26
27}
This class represents a character controlled by a player.
Definition Player.java:125
OutgoingPacket(int opcode, int capacity)
boolean encode(Player player)
Definition SendURL.java:22
Represents a type of packet.
VAR_BYTE
A variable packet where the size is indicated by a byte.