Skip to content

Item

class Item(
val id: Int,
var amount: Int = 1
)
constructor(other: Item)
constructor(
other: Item,
amount: Int
)
Example
on_login { player ->
val lunch = Item(Assets.Item.shark.id, amount = 3)
World.spawn(lunch, player.tile4, owner = player)
player.message("${lunch.amount} x ${lunch.name} land at your feet.")
}
val id: Int
var amount: Int
val name: String