From 31fff0623d4f583600d4182b3c72672bd562b476 Mon Sep 17 00:00:00 2001 From: GJ Date: Sat, 2 Mar 2013 21:48:44 -0500 Subject: [PATCH] Fixed bug where the PTP cooldown was set improperly. --- Changelog.txt | 1 + .../java/com/gmail/nossr50/commands/party/PtpCommand.java | 2 +- .../com/gmail/nossr50/datatypes/player/PlayerProfile.java | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index c08b64d94..cf1f588c6 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -14,6 +14,7 @@ Version 1.4.01-dev = Fixed bug where repairing an mcMMO ability-buffed item with mcMMO repair could take the enchant but leave the lore tag = Fixed bug where using '/party chat message...' would result in the first word of the message being printed repeatedly = Fixed bug where the wrong flag was being set when taking damage + = Fixed bug where the PTP cooldown was set improperly Version 1.4.00 + Added new Child Skill - Smelting! diff --git a/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java b/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java index a84cd9d27..a5965300d 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java @@ -213,7 +213,7 @@ public class PtpCommand implements CommandExecutor { player.teleport(target); player.sendMessage(LocaleLoader.getString("Party.Teleport.Player", target.getName())); target.sendMessage(LocaleLoader.getString("Party.Teleport.Target", player.getName())); - mcMMOPlayer.getProfile().setRecentlyHurt(System.currentTimeMillis()); + mcMMOPlayer.getProfile().actualizeRecentlyHurt(); return true; } } diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java index fbf64d1ed..3c7a91179 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -63,7 +63,7 @@ public class PlayerProfile { private boolean displaySkillNotifications = true; // Timestamps - private long recentlyHurt; + private int recentlyHurt; private int respawnATS; // mySQL Stuff @@ -906,11 +906,11 @@ public class PlayerProfile { * Recently Hurt */ - public long getRecentlyHurt() { + public int getRecentlyHurt() { return recentlyHurt; } - public void setRecentlyHurt(long value) { + public void setRecentlyHurt(int value) { recentlyHurt = value; }