prevents crafting if the current item can't be stacked any further

(not tested)
This commit is contained in:
ASangarin 2020-07-20 16:21:30 +02:00
parent 8b8dd9282a
commit 6ff3acdd75

View File

@ -55,7 +55,7 @@ public class CraftingListener implements Listener {
} }
CachedRecipe cached = cachedRecipe.get(e.getWhoClicked().getUniqueId()); CachedRecipe cached = cachedRecipe.get(e.getWhoClicked().getUniqueId());
cachedRecipe.remove(e.getWhoClicked().getUniqueId()); cachedRecipe.remove(e.getWhoClicked().getUniqueId());
if (!cached.isValid(inv.getMatrix())) { if (!cached.isValid(inv.getMatrix()) || !e.getCurrentItem().isSimilar(cached.getResult())) {
e.setCancelled(true); e.setCancelled(true);
return; return;
} }