use of io.xol.chunkstories.api.net.packets.PacketOpenInventory in project chunkstories by Hugobros3.
the class ServerPlayer method openInventory.
@Override
public void openInventory(Inventory inventory) {
Entity entity = this.getControlledEntity();
if (inventory.isAccessibleTo(entity)) {
if (inventory instanceof EntityComponentInventory.EntityInventory) {
// this.sendMessage("Notice: Pushing this inventory to you so you can see the
// contents");
EntityComponentInventory.EntityInventory i = (EntityComponentInventory.EntityInventory) inventory;
i.asComponent().pushComponent(this);
}
// this.sendMessage("Sending you the open inventory request.");
PacketOpenInventory open = new PacketOpenInventory(getWorld(), inventory);
this.pushPacket(open);
}
// else
// this.sendMessage("Notice: You don't have access to this inventory.");
}
Aggregations