Java Code Examples for protocolsupport.protocol.serializer.StringSerializer#readShortUTF16BEString()
The following examples show how to use
protocolsupport.protocol.serializer.StringSerializer#readShortUTF16BEString() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScoreboardTeamPacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 6 votes |
@Override protected void read0(ByteBuf from) { this.name = StringSerializer.readShortUTF16BEString(from); this.mode = from.readByte(); if ((this.mode == 0) || (this.mode == 2)) { this.displayName = StringSerializer.readShortUTF16BEString(from); this.prefix = StringSerializer.readShortUTF16BEString(from); this.suffix = StringSerializer.readShortUTF16BEString(from); this.friendlyFire = from.readByte(); } if ((this.mode == 0) || (this.mode == 3) || (this.mode == 4)) { int len = from.readShort(); this.players = new String[len]; for (int i = 0; i < len; ++i) { this.players[i] = StringSerializer.readShortUTF16BEString(from); } } }
Example 2
Source File: LoginHandshakePacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 5 votes |
@Override protected void read0(ByteBuf from) { from.readByte(); username = StringSerializer.readShortUTF16BEString(from); host = StringSerializer.readShortUTF16BEString(from); port = from.readInt(); }
Example 3
Source File: ScoreboardScorePacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 5 votes |
@Override protected void read0(ByteBuf from) { itemName = StringSerializer.readShortUTF16BEString(from); action = from.readByte(); if (action != 1) { scoreName = StringSerializer.readShortUTF16BEString(from); value = from.readInt(); } }
Example 4
Source File: PingHandshakePacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 5 votes |
@Override protected void read0(ByteBuf from) { from.readUnsignedByte(); from.readUnsignedByte(); StringSerializer.readShortUTF16BEString(from); from.readUnsignedShort(); from.readUnsignedByte(); host = StringSerializer.readShortUTF16BEString(from); port = from.readInt(); }
Example 5
Source File: TabComplete.java From ProtocolSupport with GNU Affero General Public License v3.0 | 5 votes |
@Override protected void readClientData(ByteBuf clientdata) { id = 0; string = StringSerializer.readShortUTF16BEString(clientdata, 256); if (string.equals("/")) { string = ""; } }
Example 6
Source File: PlayerListItemPacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 5 votes |
@Override protected void read0(ByteBuf from) { String username = StringSerializer.readShortUTF16BEString(from); boolean add = from.readBoolean(); int ping = from.readShort(); action = add ? Action.ADD_PLAYER : Action.REMOVE_PLAYER; Item item = new Item(); item.setUsername(username); item.setDisplayName(username); item.setGamemode(0); item.setPing(ping); items = new Item[] { item }; }
Example 7
Source File: UpdateSign.java From ProtocolSupport with GNU Affero General Public License v3.0 | 5 votes |
@Override protected void readClientData(ByteBuf clientdata) { PositionSerializer.readLegacyPositionSTo(clientdata, position); for (int i = 0; i < lines.length; i++) { lines[i] = StringSerializer.readShortUTF16BEString(clientdata, 15); } }
Example 8
Source File: ClientLogin.java From ProtocolSupport with GNU Affero General Public License v3.0 | 5 votes |
@Override protected void readClientData(ByteBuf clientdata) { clientdata.readUnsignedByte(); username = StringSerializer.readShortUTF16BEString(clientdata, 16); hostname = StringSerializer.readShortUTF16BEString(clientdata, Short.MAX_VALUE); port = clientdata.readInt(); }
Example 9
Source File: RespawnPacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 5 votes |
@Override protected void read0(ByteBuf from) { dimension = from.readInt(); difficulty = from.readByte(); gamemode = from.readByte(); from.readShort(); levelType = StringSerializer.readShortUTF16BEString(from); }
Example 10
Source File: ClientSettings.java From ProtocolSupport with GNU Affero General Public License v3.0 | 5 votes |
@Override protected void readClientData(ByteBuf clientdata) { locale = StringSerializer.readShortUTF16BEString(clientdata, 16); viewDist = clientdata.readByte(); int chatState = clientdata.readByte(); chatMode = ChatMode.CONSTANT_LOOKUP.getByOrdinal(chatState & 7); chatColors = (chatState & 8) == 8; clientdata.readByte(); clientdata.readBoolean(); skinFlags = 255; mainHand = MainHand.RIGHT; }
Example 11
Source File: Ping.java From ProtocolSupport with GNU Affero General Public License v3.0 | 5 votes |
@Override protected void readClientData(ByteBuf clientdata) { clientdata.readUnsignedByte(); clientdata.readUnsignedByte(); StringSerializer.readShortUTF16BEString(clientdata, Short.MAX_VALUE); clientdata.readUnsignedShort(); clientdata.readUnsignedByte(); hostname = StringSerializer.readShortUTF16BEString(clientdata, Short.MAX_VALUE); port = clientdata.readInt(); }
Example 12
Source File: Chat.java From ProtocolSupport with GNU Affero General Public License v3.0 | 4 votes |
@Override protected void readClientData(ByteBuf clientdata) { message = StringSerializer.readShortUTF16BEString(clientdata, Short.MAX_VALUE); }
Example 13
Source File: KickDisconnect.java From ProtocolSupport with GNU Affero General Public License v3.0 | 4 votes |
@Override protected void readClientData(ByteBuf clientdata) { StringSerializer.readShortUTF16BEString(clientdata, 32); }
Example 14
Source File: CustomPayload.java From ProtocolSupport with GNU Affero General Public License v3.0 | 4 votes |
@Override protected void readClientData(ByteBuf clientdata) { tag = StringSerializer.readShortUTF16BEString(clientdata, 20); data = ArraySerializer.readShortByteArraySlice(clientdata, Short.MAX_VALUE); }
Example 15
Source File: TabCompleteRequestPacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 4 votes |
@Override protected void read0(ByteBuf from) { string = StringSerializer.readShortUTF16BEString(from); }
Example 16
Source File: PluginMessagePacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 4 votes |
@Override protected void read0(ByteBuf from) { tag = StringSerializer.readShortUTF16BEString(from); data = ArraySerializer.readShortLengthByteArray(from); }
Example 17
Source File: FromClientChatPacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 4 votes |
@Override protected void read0(ByteBuf from) { message = StringSerializer.readShortUTF16BEString(from); }
Example 18
Source File: TabCompleteResponsePacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 4 votes |
@Override protected void read0(ByteBuf from) { string = StringSerializer.readShortUTF16BEString(from); }
Example 19
Source File: ScoreboardObjectivePacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 4 votes |
@Override protected void read0(ByteBuf from) { name = StringSerializer.readShortUTF16BEString(from); value = StringSerializer.readShortUTF16BEString(from); action = from.readByte(); }
Example 20
Source File: ScoreboardDisplayPacket.java From ProtocolSupportBungee with GNU Affero General Public License v3.0 | 4 votes |
@Override protected void read0(ByteBuf from) { position = from.readByte(); name = StringSerializer.readShortUTF16BEString(from); }