blob: eec03d0448c30df635728a871e496e6545acc345 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package cat.freya.khs.util.packet;
import com.comphenix.protocol.PacketType;
import org.bukkit.entity.Entity;
import org.jetbrains.annotations.NotNull;
public class EntityTeleportPacket extends AbstractPacket {
public EntityTeleportPacket(){
super(PacketType.Play.Server.ENTITY_TELEPORT);
}
public void setEntity(@NotNull Entity entity){
super.packet.getIntegers().write(0, entity.getEntityId());
}
public void setX(double x){
super.packet.getDoubles().write(0, x);
}
public void setY(double y){
super.packet.getDoubles().write(1, y);
}
public void setZ(double z){
super.packet.getDoubles().write(2, z);
}
}
|