diff --git a/src/main/java/cn/nukkit/Player.java b/src/main/java/cn/nukkit/Player.java index 8b2119b8131..84b075d5ebf 100644 --- a/src/main/java/cn/nukkit/Player.java +++ b/src/main/java/cn/nukkit/Player.java @@ -1547,7 +1547,7 @@ protected void processMovement(int tickDiff) { if (!to.equals(ev.getTo())) { //If plugins modify the destination this.teleport(ev.getTo(), null); } else { - this.sendPosition(new Vector3(this.x, this.y, this.z), this.yaw, this.pitch, MovePlayerPacket.MODE_NORMAL, this.getViewers().values().toArray(new Player[0])); + this.addMovement(this.x, this.y, this.z, this.yaw, this.pitch, this.yaw); } //Biome biome = Biome.biomes[level.getBiomeId(this.getFloorX(), this.getFloorZ())]; //sendTip(biome.getName() + " (" + biome.doesOverhang() + " " + biome.getBaseHeight() + "-" + biome.getHeightVariation() + ")"); @@ -1610,6 +1610,11 @@ protected void processMovement(int tickDiff) { this.newPosition = null; } + @Override + public void addMovement(double x, double y, double z, double yaw, double pitch, double headYaw) { + this.sendPosition(new Vector3(x, y, z), yaw, pitch, MovePlayerPacket.MODE_NORMAL, this.getViewers().values().toArray(new Player[0])); + } + @Override public boolean setMotion(Vector3 motion) { if (super.setMotion(motion)) {