mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Update doc string for hasSpaceFor and set amount to 1 by default
This commit is contained in:
parent
de98be077e
commit
3e0dea0d1b
1 changed files with 3 additions and 2 deletions
|
|
@ -687,10 +687,11 @@ fun hasSpaceFor(player: Player, item: Item): Boolean {
|
|||
/**
|
||||
* Checks if a player has space for an item
|
||||
* @param player the player whose inventory to check
|
||||
* @param item the Item to check against
|
||||
* @param item the item ID to check against
|
||||
* @param amount the amount of the item (default 1) to check for
|
||||
* @return true if the player's inventory has space for the item
|
||||
*/
|
||||
fun hasSpaceFor(player: Player, item: Int, amount: Int): Boolean {
|
||||
fun hasSpaceFor(player: Player, item: Int, amount: Int = 1): Boolean {
|
||||
return hasSpaceFor(player, Item(item, amount))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue