mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 07:23:43 +01:00
24 lines
1.4 KiB
Diff
24 lines
1.4 KiB
Diff
--- a/net/minecraft/server/CommandTeleport.java
|
|
+++ b/net/minecraft/server/CommandTeleport.java
|
|
@@ -49,7 +49,7 @@
|
|
while (iterator.hasNext()) {
|
|
Entity entity1 = (Entity) iterator.next();
|
|
|
|
- a(commandlistenerwrapper, entity1, commandlistenerwrapper.getWorld(), entity.locX, entity.locY, entity.locZ, EnumSet.noneOf(PacketPlayOutPosition.EnumPlayerTeleportFlags.class), entity.yaw, entity.pitch, (CommandTeleport.a) null);
|
|
+ a(commandlistenerwrapper, entity1, (WorldServer) entity.world, entity.locX, entity.locY, entity.locZ, EnumSet.noneOf(PacketPlayOutPosition.EnumPlayerTeleportFlags.class), entity.yaw, entity.pitch, (CommandTeleport.a) null); // SPIGOT-4245, MC-128441 - use target world as destination
|
|
}
|
|
|
|
if (collection.size() == 1) {
|
|
@@ -120,9 +120,9 @@
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
entity.setHeadRotation(f);
|