mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-10 13:49:04 +01:00
Fix EOFException with ClientClickWindow
This commit is contained in:
parent
f8c358adcd
commit
9bc4915d6c
@ -240,6 +240,10 @@ public class PlayerInit {
|
||||
|
||||
player.setGlowing(true);
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
player.getInventory().setItemStack(i, new ItemStack(Material.STONE, (byte) 127));
|
||||
}
|
||||
|
||||
ItemStack item = new ItemStack(Material.STONE_SWORD, (byte) 1);
|
||||
item.setDisplayName(ColoredText.of(ChatColor.BLUE + "Item name"));
|
||||
item.getLore().add(ColoredText.of(ChatColor.RED + "a lore line " + ChatColor.BLACK + " BLACK"));
|
||||
@ -247,10 +251,6 @@ public class PlayerInit {
|
||||
item.setEnchantment(Enchantment.SHARPNESS, (short) 50);
|
||||
player.getInventory().addItemStack(item);
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
player.getInventory().setItemStack(i, new ItemStack(Material.STONE, (byte) 127));
|
||||
}
|
||||
|
||||
player.setHelmet(new ItemStack(Material.DIAMOND_HELMET, (byte) 1));
|
||||
|
||||
player.getInventory().setItemStack(41, ItemStack.getAirItem());
|
||||
|
@ -115,7 +115,12 @@ public class PacketReader extends InputStream {
|
||||
|
||||
@Override
|
||||
public int read() {
|
||||
return readByte();
|
||||
return readByte() & 0xFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int available() {
|
||||
return buffer.readableBytes();
|
||||
}
|
||||
|
||||
public NBT readTag() throws IOException, NBTException {
|
||||
|
Loading…
Reference in New Issue
Block a user