mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-20 07:01:22 +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.
|
// The items are stored in the cursor. Make sure there's enough space.
|
||||||
if (isStackSumLegal(toCraft, toStore)) {
|
if (isStackSumLegal(toCraft, toStore)) {
|
||||||
int newItemsCount = toCraft.getAmount();
|
int newItemsCount = toCraft.getAmount();
|
||||||
while (newItemsCount >= 0) {
|
while (newItemsCount >= 1) {
|
||||||
newItemsCount--;
|
newItemsCount--;
|
||||||
if (resultStack.hasItemMeta() && resultStack.getItemMeta().hasDisplayName())
|
if (resultStack.hasItemMeta() && resultStack.getItemMeta().hasDisplayName())
|
||||||
Jobs.action(jPlayer, new ItemNameActionInfo(ChatColor.stripColor(resultStack.getItemMeta().getDisplayName()), ActionType.CRAFT));
|
Jobs.action(jPlayer, new ItemNameActionInfo(ChatColor.stripColor(resultStack.getItemMeta().getDisplayName()), ActionType.CRAFT));
|
||||||
@ -570,7 +570,7 @@ public class JobsPaymentListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newItemsCount > 0) {
|
if (newItemsCount > 0) {
|
||||||
while (newItemsCount >= 0) {
|
while (newItemsCount >= 1) {
|
||||||
newItemsCount--;
|
newItemsCount--;
|
||||||
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user