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

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