From 515b357c19dbe0b860a312409948e7ac6d33827c Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 4 Feb 2014 12:44:25 -0500 Subject: [PATCH] [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. By: GJ --- .../main/java/org/bukkit/command/defaults/TeleportCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/TeleportCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/TeleportCommand.java index 2147d3ee4..fd1b9bd0f 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/TeleportCommand.java +++ b/paper-api/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;