mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
PTP exploit fix
This commit is contained in:
parent
d0f66ece98
commit
8669582e8f
@ -18,6 +18,7 @@ Version 2.0.00-dev
|
|||||||
= Fixed issue where every block broken had a mining check applied
|
= Fixed issue where every block broken had a mining check applied
|
||||||
= Fixed issue where every block broken had a herbalism check applied
|
= Fixed issue where every block broken had a herbalism check applied
|
||||||
= Fixed issue where blocks weren't being removed from the watchlist
|
= Fixed issue where blocks weren't being removed from the watchlist
|
||||||
|
= Fixed exploit where you could use /ptp to teleport to anyone
|
||||||
! Changed inspect failed message to say inspect rather than whois
|
! Changed inspect failed message to say inspect rather than whois
|
||||||
! Changed Call of the Wild to activate on left-click rather than right-click
|
! Changed Call of the Wild to activate on left-click rather than right-click
|
||||||
! Changed Blast Mining to track based on Entity ID vs. Location
|
! Changed Blast Mining to track based on Entity ID vs. Location
|
||||||
|
@ -34,10 +34,17 @@ public class PtpCommand implements CommandExecutor {
|
|||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(PP.getParty() == null || PP.getParty() == "")
|
||||||
|
{
|
||||||
|
player.sendMessage(ChatColor.RED+"You are not in a party!");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
player.sendMessage(ChatColor.RED + "Usage is /ptp <playername>");
|
player.sendMessage(ChatColor.RED + "Usage is /ptp <playername>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.getServer().getPlayer(args[0]) == null) {
|
if (plugin.getServer().getPlayer(args[0]) == null) {
|
||||||
player.sendMessage("That is not a valid player");
|
player.sendMessage("That is not a valid player");
|
||||||
}
|
}
|
||||||
@ -49,6 +56,8 @@ public class PtpCommand implements CommandExecutor {
|
|||||||
player.teleport(target);
|
player.teleport(target);
|
||||||
player.sendMessage(ChatColor.GREEN + "You have teleported to " + target.getName());
|
player.sendMessage(ChatColor.GREEN + "You have teleported to " + target.getName());
|
||||||
target.sendMessage(ChatColor.GREEN + player.getName() + " has teleported to you.");
|
target.sendMessage(ChatColor.GREEN + player.getName() + " has teleported to you.");
|
||||||
|
} else {
|
||||||
|
player.sendMessage(ChatColor.RED + "That player is in a different party than you.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user