mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-08 11:41:28 +01:00
Fixed -1 delay on purchase use.
This commit is contained in:
parent
27684ddf62
commit
de5333e1c9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user