mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Fixed exploit where you could teleport to yourself...
This commit is contained in:
parent
b9c8fed01f
commit
e3803702c5
@ -51,6 +51,10 @@ public class PtpCommand implements CommandExecutor {
|
|||||||
|
|
||||||
Player target = plugin.getServer().getPlayer(args[0]);
|
Player target = plugin.getServer().getPlayer(args[0]);
|
||||||
|
|
||||||
|
if (player.equals(target)) {
|
||||||
|
player.sendMessage("You can't teleport to yourself!"); //TODO: Use locale
|
||||||
|
}
|
||||||
|
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
player.sendMessage(mcLocale.getString("Party.Teleport.Invalid"));
|
player.sendMessage(mcLocale.getString("Party.Teleport.Invalid"));
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user