RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.net.packet.out.SendAnnouncement Class Reference
Inheritance diagram for com.runehive.net.packet.out.SendAnnouncement:
Collaboration diagram for com.runehive.net.packet.out.SendAnnouncement:

Public Member Functions

boolean encode (Player player)
 SendAnnouncement (Object title, Object message, int color)
Public Member Functions inherited from com.runehive.net.packet.OutgoingPacket
void execute (Player player)
 OutgoingPacket (int opcode, int capacity)
 OutgoingPacket (int opcode, PacketType type)
 OutgoingPacket (int opcode, PacketType type, int size)

Private Attributes

final int color
final String message
final String title

Additional Inherited Members

Protected Attributes inherited from com.runehive.net.packet.OutgoingPacket
final PacketBuilder builder

Detailed Description

Definition at line 7 of file SendAnnouncement.java.

Constructor & Destructor Documentation

◆ SendAnnouncement()

com.runehive.net.packet.out.SendAnnouncement.SendAnnouncement ( Object title,
Object message,
int color )

Definition at line 12 of file SendAnnouncement.java.

12 {
13 super(202, PacketType.VAR_BYTE);
14 this.title = String.valueOf(title);
15 this.message = String.valueOf(message);
16 this.color = color;
17 }

References color, message, title, and com.runehive.net.packet.PacketType.VAR_BYTE.

Member Function Documentation

◆ encode()

boolean com.runehive.net.packet.out.SendAnnouncement.encode ( Player player)

Reimplemented from com.runehive.net.packet.OutgoingPacket.

Definition at line 20 of file SendAnnouncement.java.

20 {
21 builder.writeString(title)
22 .writeString(message)
23 .writeInt(color);
24 return true;
25 }

References com.runehive.net.packet.OutgoingPacket.builder, color, message, and title.

Member Data Documentation

◆ color

final int com.runehive.net.packet.out.SendAnnouncement.color
private

Definition at line 10 of file SendAnnouncement.java.

Referenced by encode(), and SendAnnouncement().

◆ message

final String com.runehive.net.packet.out.SendAnnouncement.message
private

Definition at line 9 of file SendAnnouncement.java.

Referenced by encode(), and SendAnnouncement().

◆ title

final String com.runehive.net.packet.out.SendAnnouncement.title
private

Definition at line 8 of file SendAnnouncement.java.

Referenced by encode(), and SendAnnouncement().


The documentation for this class was generated from the following file: