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

@ -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;