mirror of
https://github.com/songoda/EpicVouchers.git
synced 2025-01-24 16:31:29 +01:00
If in cooldown you can no longer place the voucher.
This commit is contained in:
parent
7f19b45007
commit
2818a88138
@ -51,16 +51,15 @@ public class PlayerInteractListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UUID uuid = player.getUniqueId();
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
if (instance.getCoolDowns().isOnCoolDown(uuid)) {
|
||||
player.sendMessage(instance.getLocale().getMessage("event.general.cooldown", instance.getCoolDowns().getTime(uuid), voucher.getName(true)));
|
||||
return;
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
if (voucher.isConfirm()) {
|
||||
new ConfirmMenu(instance,
|
||||
() -> instance.getVoucherExecutor().redeemVoucher(player, voucher, item, true, event),
|
||||
|
Loading…
Reference in New Issue
Block a user