From 70c1354a4a96698758a88c032866288f79de6f5a Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Sat, 24 Aug 2024 08:16:37 -0400 Subject: Initial commit --- .../packet/MessagePlayerJoinInAnnouncement.java | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/main/java/jp/plusplus/fbs/packet/MessagePlayerJoinInAnnouncement.java (limited to 'src/main/java/jp/plusplus/fbs/packet/MessagePlayerJoinInAnnouncement.java') diff --git a/src/main/java/jp/plusplus/fbs/packet/MessagePlayerJoinInAnnouncement.java b/src/main/java/jp/plusplus/fbs/packet/MessagePlayerJoinInAnnouncement.java new file mode 100644 index 0000000..70c8ce8 --- /dev/null +++ b/src/main/java/jp/plusplus/fbs/packet/MessagePlayerJoinInAnnouncement.java @@ -0,0 +1,37 @@ +package jp.plusplus.fbs.packet; + +import cpw.mods.fml.common.network.ByteBufUtils; +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import io.netty.buffer.ByteBuf; +import net.minecraft.entity.player.EntityPlayer; + +/** + * Createdby pluslus_Fon 2015/06/05. + */ +public class MessagePlayerJoinInAnnouncement implements IMessage { + + private String uuid; + + public MessagePlayerJoinInAnnouncement(){} + public MessagePlayerJoinInAnnouncement(EntityPlayer player) { + this.uuid = player.getGameProfile().getId().toString(); + } + + @Override + public void fromBytes(ByteBuf buf) { + this.uuid = ByteBufUtils.readUTF8String(buf); + } + + @Override + public void toBytes(ByteBuf buf) { + ByteBufUtils.writeUTF8String(buf, this.uuid); + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } +} -- cgit v1.2.3