Java 类net.minecraft.server.PacketPlayOutHeldItemSlot 实例源码

项目:CraftBukkit    文件:CraftInventoryPlayer.java   
public void setHeldItemSlot(int slot) {
    Validate.isTrue(slot >= 0 && slot < PlayerInventory.getHotbarSize(), "Slot is not between 0 and 8 inclusive");
    this.getInventory().itemInHandIndex = slot;
    ((CraftPlayer) this.getHolder()).getHandle().playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(slot));
}
项目:Craftbukkit    文件:CraftInventoryPlayer.java   
public void setHeldItemSlot(int slot) {
    Validate.isTrue(slot >= 0 && slot < PlayerInventory.getHotbarSize(), "Slot is not between 0 and 8 inclusive");
    this.getInventory().itemInHandIndex = slot;
    ((CraftPlayer) this.getHolder()).getHandle().playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(slot));
}
项目:Tweakkit-Server    文件:CraftInventoryPlayer.java   
public void setHeldItemSlot(int slot) {
    Validate.isTrue(slot >= 0 && slot < PlayerInventory.getHotbarSize(), "Slot is not between 0 and 8 inclusive");
    this.getInventory().itemInHandIndex = slot;
    ((CraftPlayer) this.getHolder()).getHandle().playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(slot));
}
项目:SpigotSource    文件:CraftInventoryPlayer.java   
public void setHeldItemSlot(int slot) {
    Validate.isTrue(slot >= 0 && slot < PlayerInventory.getHotbarSize(), "Slot is not between 0 and 8 inclusive");
    this.getInventory().itemInHandIndex = slot;
    ((CraftPlayer) this.getHolder()).getHandle().playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(slot));
}