2019-08-03 15:25:24 +02:00
|
|
|
package fr.themode.minestom.entity;
|
|
|
|
|
|
|
|
import fr.themode.minestom.net.player.PlayerConnection;
|
|
|
|
|
2019-08-10 08:44:35 +02:00
|
|
|
public class Player extends LivingEntity {
|
|
|
|
|
|
|
|
private boolean isSneaking;
|
|
|
|
private boolean isSprinting;
|
2019-08-03 15:25:24 +02:00
|
|
|
|
2019-08-10 04:47:19 +02:00
|
|
|
private long lastKeepAlive;
|
2019-08-10 04:16:01 +02:00
|
|
|
|
2019-08-03 15:25:24 +02:00
|
|
|
private PlayerConnection playerConnection;
|
|
|
|
|
2019-08-10 08:44:35 +02:00
|
|
|
// TODO set proper UUID
|
2019-08-10 04:47:19 +02:00
|
|
|
public Player(PlayerConnection playerConnection) {
|
|
|
|
this.playerConnection = playerConnection;
|
|
|
|
}
|
|
|
|
|
2019-08-10 08:44:35 +02:00
|
|
|
@Override
|
|
|
|
public void update() {
|
|
|
|
// System.out.println("Je suis l'update");
|
|
|
|
}
|
|
|
|
|
2019-08-03 15:25:24 +02:00
|
|
|
public PlayerConnection getPlayerConnection() {
|
|
|
|
return playerConnection;
|
|
|
|
}
|
2019-08-10 04:16:01 +02:00
|
|
|
|
|
|
|
public void refreshPosition(double x, double y, double z) {
|
|
|
|
this.x = x;
|
|
|
|
this.y = y;
|
|
|
|
this.z = z;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void refreshView(float yaw, float pitch) {
|
|
|
|
this.yaw = yaw;
|
|
|
|
this.pitch = pitch;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void refreshOnGround(boolean onGround) {
|
|
|
|
this.onGround = onGround;
|
|
|
|
}
|
|
|
|
|
2019-08-10 08:44:35 +02:00
|
|
|
public void refreshSneaking(boolean sneaking) {
|
|
|
|
isSneaking = sneaking;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void refreshSprinting(boolean sprinting) {
|
|
|
|
isSprinting = sprinting;
|
|
|
|
}
|
|
|
|
|
2019-08-10 04:47:19 +02:00
|
|
|
public void refreshKeepAlive(long lastKeepAlive) {
|
|
|
|
this.lastKeepAlive = lastKeepAlive;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long getLastKeepAlive() {
|
|
|
|
return lastKeepAlive;
|
|
|
|
}
|
2019-08-03 15:25:24 +02:00
|
|
|
}
|