Search in sources :

Example 1 with WrapperPlayServerBed

use of com.comphenix.packetwrapper.WrapperPlayServerBed in project AdvancedReplay by Jumper251.

the class PacketNPCOld method sleep.

public void sleep(Location loc) {
    WrapperPlayServerBed packet = new WrapperPlayServerBed();
    packet.setEntityID(this.id);
    packet.setLocation(new BlockPosition(loc.toVector()));
    for (Player player : Arrays.asList(this.visible)) {
        if (player != null) {
            packet.sendPacket(player);
        }
    }
}
Also used : Player(org.bukkit.entity.Player) BlockPosition(com.comphenix.protocol.wrappers.BlockPosition) WrapperPlayServerBed(com.comphenix.packetwrapper.WrapperPlayServerBed)

Example 2 with WrapperPlayServerBed

use of com.comphenix.packetwrapper.WrapperPlayServerBed in project AdvancedReplay by Jumper251.

the class PacketNPC method sleep.

public void sleep(Location loc) {
    WrapperPlayServerBed packet = new WrapperPlayServerBed();
    packet.setEntityID(this.id);
    packet.setLocation(new BlockPosition(loc.toVector()));
    for (Player player : Arrays.asList(this.visible)) {
        if (player != null) {
            packet.sendPacket(player);
        }
    }
}
Also used : Player(org.bukkit.entity.Player) BlockPosition(com.comphenix.protocol.wrappers.BlockPosition) WrapperPlayServerBed(com.comphenix.packetwrapper.WrapperPlayServerBed)

Aggregations

WrapperPlayServerBed (com.comphenix.packetwrapper.WrapperPlayServerBed)2 BlockPosition (com.comphenix.protocol.wrappers.BlockPosition)2 Player (org.bukkit.entity.Player)2