PTP now has a 30 second cooldown from when you were last hurt

This commit is contained in:
nossr50 2012-03-09 16:40:39 -08:00
parent 3eb8f6a1a4
commit a40d3f5f9c
2 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,7 @@ Version 2.0.00-dev
= Fixed bug where Green Terra didn't work on Stone Brick
= Fixed bug where Tree Feller could be used without permissions
= Fixed exploit where falling sand & gravel weren't tracked
! Changed PTP to prevent teleporting if you've been hurt in the last 30 seconds
! Changed Chimera Wing failure check to use the maxWorldHeight.
! Changed inspect failed message to say inspect rather than whois
! Changed Call of the Wild to activate on left-click rather than right-click

View File

@ -42,6 +42,12 @@ public class PtpCommand implements CommandExecutor {
return true;
}
if(PP.getRecentlyHurt()+30*1000 > System.currentTimeMillis())
{
player.sendMessage("You've been hurt in the last 30 seconds and cannnot teleport.");
return true;
}
if (args.length < 1) {
player.sendMessage(ChatColor.RED + "Usage is /ptp <playername>");
return true;