Paper/nms-patches/CommandTeleport.patch

15 lines
810 B
Diff
Raw Normal View History

2017-06-04 00:39:36 +02:00
--- a/net/minecraft/server/CommandTeleport.java
+++ b/net/minecraft/server/CommandTeleport.java
2018-07-15 02:00:00 +02:00
@@ -116,9 +116,9 @@
if (entity instanceof EntityPlayer) {
entity.stopRiding();
if (worldserver == entity.world) {
- ((EntityPlayer) entity).playerConnection.a(d0, d1, d2, f, f1, set);
+ ((EntityPlayer) entity).playerConnection.a(d0, d1, d2, f, f1, set, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.COMMAND); // CraftBukkit
} else {
- ((EntityPlayer) entity).a(worldserver, d0, d1, d2, f, f1);
+ ((EntityPlayer) entity).a(worldserver, d0, d1, d2, f, f1, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.COMMAND); // CraftBukkit
2017-06-04 00:39:36 +02:00
}
entity.setHeadRotation(f);