Fix rtp cooldown not working, close #224

This commit is contained in:
William committed 2022-09-21 20:57:20 +01:00
1 parent 7fabf8fc6f
commit c2661a7017
1 file changed
+1 -2
@@ -61,8 +61,7 @@ public class RtpCommand extends CommandBase implements ConsoleExecutable {
return; return;
} }
final Instant currentTime = Instant.now(); final Instant currentTime = Instant.now();
if (!isExecutorTeleporting if (isExecutorTeleporting && !currentTime.isAfter(userData.get().rtpCooldown())
&& !currentTime.isAfter(userData.get().rtpCooldown())
&& !onlineUser.hasPermission(Permission.BYPASS_RTP_COOLDOWN.node)) { && !onlineUser.hasPermission(Permission.BYPASS_RTP_COOLDOWN.node)) {
plugin.getLocales().getLocale("error_rtp_cooldown", plugin.getLocales().getLocale("error_rtp_cooldown",
Long.toString(currentTime.until(userData.get().rtpCooldown(), ChronoUnit.MINUTES))) Long.toString(currentTime.until(userData.get().rtpCooldown(), ChronoUnit.MINUTES)))