mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 11:59:26 +00:00
add get reset disable purchase num by slot number and IPlayer
needed to add get/setStringIntegerArrayMap to NBTTags so save the player purchases and disabled slots with a String int[] hashmap
This commit is contained in:
1 parent
e7250158ac
commit
3cf780d9a2
4 files changed
+141
-13
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.purchases[i];
|
||||
role.addPurchase(i, entityplayer);
|
||||
return soldItem;
|
||||
|
||||
}
|
||||
public boolean isSlotEnabled(int slot, EntityPlayer player) {
|
||||
return role.disableSlot[slot] == 0;
|
||||
return role.isSlotEnabled(slot, player);
|
||||
}
|
||||
public boolean canBuy(int slot, EntityPlayer player) {
|
||||
ItemStack currency = role.inventoryCurrency.getStackInSlot(slot);
|
||||
|
||||
Reference in new issue
Block a user