use of net.minecraft.server.v1_10_R1.PacketPlayOutCloseWindow in project TheAPI by TheDevTec.
the class v1_13_R2 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_12_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_13_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_8_R3 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_16_R3 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