use of org.bukkit.craftbukkit.v1_9_R2.inventory.CraftInventoryView in project SpaciousLib by anhcraft.
the class Anvil_1_8_R2 method open.
@Override
public void open() {
p.setLevel(p.getLevel() + 1);
container = new AnvilContainer(human);
CraftInventoryView civ = container.getBukkitView();
this.inv = civ.getTopInventory();
for (AnvilSlot slot : this.items.keySet()) {
this.inv.setItem(slot.getSlot(), this.items.get(slot));
}
int id = ep.nextContainerCounter();
ep.playerConnection.sendPacket(new PacketPlayOutOpenWindow(id, "minecraft:anvil", new ChatMessage("Repairing", new Object[] {}), 0));
ep.activeContainer = container;
ep.activeContainer.windowId = id;
ep.activeContainer.addSlotListener(ep);
}
use of org.bukkit.craftbukkit.v1_9_R2.inventory.CraftInventoryView in project SpaciousLib by anhcraft.
the class Anvil_1_8_R3 method open.
@Override
public void open() {
p.setLevel(p.getLevel() + 1);
container = new AnvilContainer(human);
CraftInventoryView civ = container.getBukkitView();
this.inv = civ.getTopInventory();
for (AnvilSlot slot : this.items.keySet()) {
this.inv.setItem(slot.getSlot(), this.items.get(slot));
}
int id = ep.nextContainerCounter();
ep.playerConnection.sendPacket(new PacketPlayOutOpenWindow(id, "minecraft:anvil", new ChatMessage("Repairing", new Object[] {}), 0));
ep.activeContainer = container;
ep.activeContainer.windowId = id;
ep.activeContainer.addSlotListener(ep);
}
use of org.bukkit.craftbukkit.v1_9_R2.inventory.CraftInventoryView in project SpaciousLib by anhcraft.
the class Anvil_1_9_R2 method open.
@Override
public void open() {
p.setLevel(p.getLevel() + 1);
container = new AnvilContainer(human);
CraftInventoryView civ = container.getBukkitView();
this.inv = civ.getTopInventory();
for (AnvilSlot slot : this.items.keySet()) {
this.inv.setItem(slot.getSlot(), this.items.get(slot));
}
int id = ep.nextContainerCounter();
ep.playerConnection.sendPacket(new PacketPlayOutOpenWindow(id, "minecraft:anvil", new ChatMessage("Repairing", new Object[] {}), 0));
ep.activeContainer = container;
ep.activeContainer.windowId = id;
ep.activeContainer.addSlotListener(ep);
}
use of org.bukkit.craftbukkit.v1_9_R2.inventory.CraftInventoryView in project SpaciousLib by anhcraft.
the class Anvil_1_11_R1 method open.
@Override
public void open() {
p.setLevel(p.getLevel() + 1);
container = new AnvilContainer(human);
CraftInventoryView civ = container.getBukkitView();
this.inv = civ.getTopInventory();
for (AnvilSlot slot : this.items.keySet()) {
this.inv.setItem(slot.getSlot(), this.items.get(slot));
}
int id = ep.nextContainerCounter();
ep.playerConnection.sendPacket(new PacketPlayOutOpenWindow(id, "minecraft:anvil", new ChatMessage("Repairing", new Object[] {}), 0));
ep.activeContainer = container;
ep.activeContainer.windowId = id;
ep.activeContainer.addSlotListener(ep);
}
use of org.bukkit.craftbukkit.v1_9_R2.inventory.CraftInventoryView in project SpaciousLib by anhcraft.
the class Anvil_1_9_R2 method open.
@Override
public void open() {
p.setLevel(p.getLevel() + 1);
container = new AnvilContainer(human);
CraftInventoryView civ = container.getBukkitView();
this.inv = civ.getTopInventory();
for (AnvilSlot slot : this.items.keySet()) {
this.inv.setItem(slot.getSlot(), this.items.get(slot));
}
int id = ep.nextContainerCounter();
ep.playerConnection.sendPacket(new PacketPlayOutOpenWindow(id, "minecraft:anvil", new ChatMessage("Repairing", new Object[] {}), 0));
ep.activeContainer = container;
ep.activeContainer.windowId = id;
ep.activeContainer.addSlotListener(ep);
}
Aggregations