Fixed achievement related NPEs in ClimbActionHandler

This commit is contained in:
Ceikry
2022-03-10 02:20:52 +00:00
committed by Ryan
parent c4d629e5b1
commit 03f944da3e
2 changed files with 13 additions and 3 deletions
+7
View File
@@ -128,6 +128,13 @@ fun amountInEquipment(player: Player, id: Int): Int{
return player.equipment.getAmount(id)
}
/**
* Check that an item is equipped by the given player
*/
fun isEquipped(player: Player, id: Int): Boolean {
return amountInEquipment(player, id) > 0
}
/**
* Remove an item from a player's inventory
* @param player the player whose inventory to remove the item from