Fix randomteleport.cooldownexempt not working

This commit is contained in:
Phoenix616 2019-08-23 19:50:48 +01:00
parent 988f2ee736
commit 66b02e8201

View File

@ -330,7 +330,7 @@ public class RandomTeleport extends JavaPlugin implements RandomTeleportAPI {
Map.Entry<Long, Integer> lastUse = cooldowns.get(searcher.getId(), target.getUniqueId());
if (lastUse != null) {
int targetCooldown = (int) ((System.currentTimeMillis() - lastUse.getKey()) / 1000);
if (targetCooldown > cooldown) {
if (targetCooldown > cooldown && !target.hasPermission("randomteleport.cooldownexempt")) {
cooldown = targetCooldown;
}
}