diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 677bd08..2a769b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "UltimateKits" path: "/builds/$CI_PROJECT_PATH" - version: "2.4.10" + version: "2.4.11" build: stage: build diff --git a/src/main/java/com/songoda/ultimatekits/kit/Kit.java b/src/main/java/com/songoda/ultimatekits/kit/Kit.java index 4f8678b..2f0edd5 100644 --- a/src/main/java/com/songoda/ultimatekits/kit/Kit.java +++ b/src/main/java/com/songoda/ultimatekits/kit/Kit.java @@ -136,14 +136,15 @@ public class Kit { return; } if (this.delay > 0) { - if (getNextUse(player) == -1) { - plugin.getLocale().getMessage("event.claim.nottwice").sendPrefixedMessage(player); - } else if (getNextUse(player) != 0) { + if (getNextUse(player) != 0) { plugin.getLocale().getMessage("event.claim.delay") .processPlaceholder("time", Methods.makeReadable(this.getNextUse(player))) .sendPrefixedMessage(player); return; } + } else if (getNextUse(player) == -1) { + plugin.getLocale().getMessage("event.claim.nottwice").sendPrefixedMessage(player); + return; } if (giveKit(player)) { EconomyManager.withdrawBalance(player, price); @@ -153,7 +154,6 @@ public class Kit { plugin.getLocale().getMessage("event.claim.purchasesuccess") .processPlaceholder("kit", showableName).sendPrefixedMessage(player); } - } public void processGenericUse(Player player, boolean forced) {