mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 16:56:31 +01:00
[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 <gjmcferrin@gmail.com>
This commit is contained in:
parent
e7478f7b85
commit
515b357c19
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue