Fix issue with /ptp command

Fixes #1773
This commit is contained in:
TfT_02 2014-01-11 10:30:12 +01:00
parent 8993c71577
commit 730f786d5b
3 changed files with 4 additions and 3 deletions

View File

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

View File

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

View File

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