use of net.minecraft.server.v1_10_R1.PacketPlayOutCloseWindow in project TheAPI by TheDevTec.
the class v1_10_R1 method closeGUI.
@Override
public void closeGUI(Player player, Object container, boolean closePacket) {
if (closePacket) {
BukkitLoader.getPacketHandler().send(player, new PacketPlayOutCloseWindow(getContainerId(container)));
}
EntityPlayer nmsPlayer = (EntityPlayer) getPlayer(player);
nmsPlayer.activeContainer = nmsPlayer.defaultContainer;
((Container) container).transferTo(nmsPlayer.activeContainer, (CraftPlayer) player);
}
use of net.minecraft.server.v1_10_R1.PacketPlayOutCloseWindow in project TheAPI by TheDevTec.
the class v1_9_R1 method closeGUI.
@Override
public void closeGUI(Player player, Object container, boolean closePacket) {
if (closePacket)
BukkitLoader.getPacketHandler().send(player, new PacketPlayOutCloseWindow(BukkitLoader.getNmsProvider().getContainerId(container)));
EntityPlayer nmsPlayer = (EntityPlayer) getPlayer(player);
nmsPlayer.activeContainer = nmsPlayer.defaultContainer;
((Container) container).transferTo(nmsPlayer.activeContainer, (CraftPlayer) player);
}
use of net.minecraft.server.v1_10_R1.PacketPlayOutCloseWindow in project TheAPI by TheDevTec.
the class v1_14_R1 method closeGUI.
@Override
public void closeGUI(Player player, Object container, boolean closePacket) {
if (closePacket)
BukkitLoader.getPacketHandler().send(player, new PacketPlayOutCloseWindow(BukkitLoader.getNmsProvider().getContainerId(container)));
EntityPlayer nmsPlayer = (EntityPlayer) getPlayer(player);
nmsPlayer.activeContainer = nmsPlayer.defaultContainer;
((Container) container).transferTo(nmsPlayer.activeContainer, (CraftPlayer) player);
}
use of net.minecraft.server.v1_10_R1.PacketPlayOutCloseWindow in project TheAPI by TheDevTec.
the class v1_15_R1 method closeGUI.
@Override
public void closeGUI(Player player, Object container, boolean closePacket) {
if (closePacket)
BukkitLoader.getPacketHandler().send(player, new PacketPlayOutCloseWindow(BukkitLoader.getNmsProvider().getContainerId(container)));
EntityPlayer nmsPlayer = (EntityPlayer) getPlayer(player);
nmsPlayer.activeContainer = nmsPlayer.defaultContainer;
((Container) container).transferTo(nmsPlayer.activeContainer, (CraftPlayer) player);
}
use of net.minecraft.server.v1_10_R1.PacketPlayOutCloseWindow in project TheAPI by TheDevTec.
the class v1_7_R4 method closeGUI.
@Override
public void closeGUI(Player player, Object container, boolean closePacket) {
if (closePacket)
BukkitLoader.getPacketHandler().send(player, new PacketPlayOutCloseWindow(BukkitLoader.getNmsProvider().getContainerId(container)));
EntityPlayer nmsPlayer = (EntityPlayer) getPlayer(player);
nmsPlayer.activeContainer = nmsPlayer.defaultContainer;
((Container) container).transferTo(nmsPlayer.activeContainer, (CraftPlayer) player);
}
Aggregations