mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Potion and arrow recognition when crafting fix
This commit is contained in:
parent
9254c8f3fb
commit
29d65dc3c4
@ -789,10 +789,20 @@ public final class JobsPaymentListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
if (resultStack == null)
|
||||
return;
|
||||
|
||||
while (newItemsCount > 0) {
|
||||
newItemsCount--;
|
||||
|
||||
Jobs.action(jPlayer, new ItemActionInfo(resultStack, type));
|
||||
if (resultStack.getItemMeta() instanceof PotionMeta) {
|
||||
PotionMeta potion = (PotionMeta) resultStack.getItemMeta();
|
||||
Jobs.action(jPlayer, new PotionItemActionInfo(resultStack, type, potion.getBasePotionData().getType()));
|
||||
} else if (resultStack.hasItemMeta() && resultStack.getItemMeta().hasDisplayName()) {
|
||||
Jobs.action(jPlayer, new ItemNameActionInfo(CMIChatColor.stripColor(resultStack.getItemMeta().getDisplayName()), type));
|
||||
} else {
|
||||
Jobs.action(jPlayer, new ItemActionInfo(resultStack, type));
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user