PlayerRole

open class PlayerRole(source)

Represents a player role This class manages role-specific attributes, inventory, and armor loadouts.

Constructors

Link copied to clipboard
constructor(name: String, displayName: String, maxPlayers: Int, description: String)
Creates a new PlayerRole with specified attributes.

Properties

Link copied to clipboard
open var armor: List<ItemStack>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun addItem(slot: Integer, item: ItemStack)
Link copied to clipboard
open fun getBoots(): ItemStack
Link copied to clipboard
open fun getChestplate(): ItemStack
Link copied to clipboard
open fun getHelmet(): ItemStack
Link copied to clipboard
open fun getInventory(): Map<Integer, ItemStack>
Returns a deep copy of the inventory contents.
Link copied to clipboard
open fun getInventorySize(): Int
Link copied to clipboard
open fun getItemAtSlot(slot: Integer): ItemStack
Link copied to clipboard
open fun getLeggins(): ItemStack
Link copied to clipboard
open fun hasItemInSlot(slot: Integer): Boolean
Link copied to clipboard
open fun removeItem(slot: Integer)
Link copied to clipboard
open fun setArmorSlot(slot: Int, item: ItemStack)
Link copied to clipboard
open fun setInventory(items: Map<Integer, ItemStack>)
Sets the inventory contents with a deep copy of the provided items.
Link copied to clipboard
open fun toString(): String
Returns a formatted string representation of the role.