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