diff options
author | GJ <gjmcferrin@gmail.com> | 2014-02-04 12:44:25 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-04-18 08:41:48 -0500 |
commit | e02ea29e311fb65efde2d9f6ae868423f054b4c2 (patch) | |
tree | 4aede7c2ac66d5269fafcb930e4c2b5b2d13b461 /src | |
parent | a981a056a4a658af982bec4827013190aa7f5c3c (diff) | |
download | bukkit-e02ea29e311fb65efde2d9f6ae868423f054b4c2.tar bukkit-e02ea29e311fb65efde2d9f6ae868423f054b4c2.tar.gz bukkit-e02ea29e311fb65efde2d9f6ae868423f054b4c2.tar.lz bukkit-e02ea29e311fb65efde2d9f6ae868423f054b4c2.tar.xz bukkit-e02ea29e311fb65efde2d9f6ae868423f054b4c2.zip |
[Bleeding] Use proper teleport reason for /tp command. Fixes BUKKIT-5348
Previously, when calling the /tp command with coordinates, no TeleportCause
was passed, causing the resulting PlayerTeleportEvent to be called with
TeleportCause.PLUGIN instead of TeleportCause.COMMAND. This commit adds the
missing TeleportCause to ensure that the resulting PlayerTeleportEvent
reports the correct TeleportCause.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/command/defaults/TeleportCommand.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/command/defaults/TeleportCommand.java b/src/main/java/org/bukkit/command/defaults/TeleportCommand.java index 2147d3ee..fd1b9bd0 100644 --- a/src/main/java/org/bukkit/command/defaults/TeleportCommand.java +++ b/src/main/java/org/bukkit/command/defaults/TeleportCommand.java @@ -71,7 +71,7 @@ public class TeleportCommand extends VanillaCommand { playerLocation.setY(y); playerLocation.setZ(z); - player.teleport(playerLocation); + player.teleport(playerLocation, TeleportCause.COMMAND); Command.broadcastCommandMessage(sender, String.format("Teleported %s to %.2f, %.2f, %.2f", player.getDisplayName(), x, y, z)); } return true; |