Fixed achievement related NPEs in ClimbActionHandler
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user