Commits
GJ authored and Travis Watkins committed e02ea29e311
64 64 | |
65 65 | if (x == MIN_COORD_MINUS_ONE || y == MIN_COORD_MINUS_ONE || z == MIN_COORD_MINUS_ONE) { |
66 66 | sender.sendMessage("Please provide a valid location!"); |
67 67 | return true; |
68 68 | } |
69 69 | |
70 70 | playerLocation.setX(x); |
71 71 | playerLocation.setY(y); |
72 72 | playerLocation.setZ(z); |
73 73 | |
74 - | player.teleport(playerLocation); |
74 + | player.teleport(playerLocation, TeleportCause.COMMAND); |
75 75 | Command.broadcastCommandMessage(sender, String.format("Teleported %s to %.2f, %.2f, %.2f", player.getDisplayName(), x, y, z)); |
76 76 | } |
77 77 | return true; |
78 78 | } |
79 79 | |
80 80 | private double getCoordinate(CommandSender sender, double current, String input) { |
81 81 | return getCoordinate(sender, current, input, MIN_COORD, MAX_COORD); |
82 82 | } |
83 83 | |
84 84 | private double getCoordinate(CommandSender sender, double current, String input, int min, int max) { |