Fix another potential issue with recentlyHurt & /ptp.

This commit is contained in:
GJ
2013-03-02 23:34:39 -05:00
parent 31fff0623d
commit 12c6bfc2e8
2 changed files with 3 additions and 2 deletions

View File

@ -57,8 +57,9 @@ public class PtpCommand implements CommandExecutor {
}
int ptpCooldown = Config.getInstance().getPTPCommandCooldown();
long recentlyHurt = playerProfile.getRecentlyHurt() * Misc.TIME_CONVERSION_FACTOR;
if (playerProfile.getRecentlyHurt() + (ptpCooldown * Misc.TIME_CONVERSION_FACTOR) > System.currentTimeMillis()) {
if (System.currentTimeMillis() - recentlyHurt >= (ptpCooldown * Misc.TIME_CONVERSION_FACTOR)) {
player.sendMessage(LocaleLoader.getString("Party.Teleport.Hurt", ptpCooldown));
return true;
}