fixed crash when hovering over a trader item slot

HashMap.put doesn't work the way I thought it did
This commit is contained in:
1whohears committed 2022-06-06 14:38:33 -05:00
1 parent 8c687e7ef5
commit 17fa6328c9
3 files changed
+10 -12

No files matched your search

@@ -68,12 +68,12 @@ public class ContainerNPCTrader extends ContainerNpcInterface{
NoppesUtilPlayer.consumeItem(entityplayer, role.inventoryCurrency.getStackInSlot(i + 18), role.ignoreDamage, role.ignoreNBT);
ItemStack soldItem = item.copy();
givePlayer(soldItem, entityplayer);
role.addPurchase(i, entityplayer);
role.addPurchase(i, entityplayer.getDisplayName());
return soldItem;
}
public boolean isSlotEnabled(int slot, EntityPlayer player) {
return role.isSlotEnabled(slot, player);
return role.isSlotEnabled(slot, player.getDisplayName());
}
public boolean canBuy(int slot, EntityPlayer player) {
ItemStack currency = role.inventoryCurrency.getStackInSlot(slot);