Fixed consumables used in wrong inventories.

This commit is contained in:
Aria 2019-09-27 18:32:25 +02:00
parent 128facc491
commit 0a4eb0f67c

View File

@ -39,7 +39,8 @@ public class Consumable extends UseItem {
* of its item options. if so, the consumable should be consumed
*/
public boolean useOnItem(InventoryClickEvent event, NBTItem target) {
if(event.getClickedInventory() != event.getWhoClicked().getInventory()) return false;
/*
* unidentified items do not have any type, so you must check if the
* item has a type first.