Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/java/gollorum/signpost/management/PostHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@ public static boolean canPay(EntityPlayer player, BlockPos origin, BlockPos dest
if(ClientConfigStorage.INSTANCE.getCost() == null || ConfigHandler.isCreative(player)){
return true;
}else{
Item paymentItem = ClientConfigStorage.INSTANCE.getCost();
int playerItemCount = 0;
for(ItemStack now: player.inventory.mainInventory){
if(now != null && now.getItem() !=null && now.getItem().getClass() == ClientConfigStorage.INSTANCE.getCost().getClass()){
if(now != null && now.getItem() !=null && now.getItem() == paymentItem){
playerItemCount += now.getCount();
}
}
Expand Down