mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-02 14:29:07 +01:00
PayForEachCraft has to exclude 0 amount items
This commit is contained in:
parent
7d5994a2e0
commit
de570bb184
@ -534,7 +534,7 @@ public class JobsPaymentListener implements Listener {
|
||||
// The items are stored in the cursor. Make sure there's enough space.
|
||||
if (isStackSumLegal(toCraft, toStore)) {
|
||||
int newItemsCount = toCraft.getAmount();
|
||||
while (newItemsCount >= 0) {
|
||||
while (newItemsCount >= 1) {
|
||||
newItemsCount--;
|
||||
if (resultStack.hasItemMeta() && resultStack.getItemMeta().hasDisplayName())
|
||||
Jobs.action(jPlayer, new ItemNameActionInfo(ChatColor.stripColor(resultStack.getItemMeta().getDisplayName()), ActionType.CRAFT));
|
||||
@ -570,7 +570,7 @@ public class JobsPaymentListener implements Listener {
|
||||
}
|
||||
}
|
||||
if (newItemsCount > 0) {
|
||||
while (newItemsCount >= 0) {
|
||||
while (newItemsCount >= 1) {
|
||||
newItemsCount--;
|
||||
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user