diff --git a/Changelog.txt b/Changelog.txt index b4df84243..a4ea758b9 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -28,6 +28,7 @@ Version 1.4.08-dev = Fixed bug where party chat broke if the display name contained special characters = Fixed bug where `/addlevels all` and `/skillreset all` didn't work = Fixed bug which made it possible to gain XP by taming the same horse multiple times, if a player "untamed" that horse + = Fixed bug where the /ptp request expiration time was checked wrongly - preventing players from using the command ! Updated localization files ! Changed AxesCritical to CriticalHit in config file ! Changed several secondary ability permissions(deprecated versions still exist) diff --git a/src/main/java/com/gmail/nossr50/commands/party/teleport/PtpAcceptCommand.java b/src/main/java/com/gmail/nossr50/commands/party/teleport/PtpAcceptCommand.java index 7c5c6d72a..f416eeca0 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/teleport/PtpAcceptCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/party/teleport/PtpAcceptCommand.java @@ -9,9 +9,9 @@ import org.bukkit.entity.Player; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.party.PartyTeleportRecord; import com.gmail.nossr50.locale.LocaleLoader; -import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.player.UserManager; +import com.gmail.nossr50.util.skills.SkillUtils; public class PtpAcceptCommand implements CommandExecutor { @Override @@ -29,7 +29,7 @@ public class PtpAcceptCommand implements CommandExecutor { return true; } - if ((ptpRecord.getTimeout() + Config.getInstance().getPTPCommandTimeout()) * Misc.TIME_CONVERSION_FACTOR < System.currentTimeMillis()) { + if (SkillUtils.cooldownExpired(ptpRecord.getTimeout(), Config.getInstance().getPTPCommandTimeout())) { ptpRecord.removeRequest(); player.sendMessage(LocaleLoader.getString("Commands.ptp.RequestExpired")); return true; diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index b75705afe..d6f27d899 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -505,7 +505,7 @@ Commands.ptp.Disabled=Party teleporting [[RED]]disabled Commands.ptp.NoRequests=[[RED]]You have no teleport requests at this time Commands.ptp.NoWorldPermissions=[[RED]][mcMMO] You do not have permission to teleport to the world {0}. Commands.ptp.Request1=[[YELLOW]]{0} [[GREEN]]has requested to teleport to you. -Commands.ptp.Request2=[[GREEN]]To teleport, type [[YELLOW]]/ptp accept. [[GREEN]]Request expires in [[RED]]{0} [[GREEN]]seconds. +Commands.ptp.Request2=[[GREEN]]To teleport, type [[YELLOW]]/ptp accept[[GREEN]]. Request expires in [[RED]]{0} [[GREEN]]seconds. Commands.ptp.AcceptAny.Enabled=Party teleport request confirmation [[GREEN]]enabled Commands.ptp.AcceptAny.Disabled=Party teleport request confirmation [[RED]]disabled Commands.ptp.RequestExpired=[[RED]]Party teleport request has expired!