GuildCode

class GuildCode(val id: String, var uses: Int, val creator: UUID, val redeemers: MutableList<UUID>)(source)

A class representing a code used to join a guild.

Parameters

id

The unique identifier of the code.

uses

The number of times the code can be used.

creator

The UUID of the player who created the code.

redeemers

The list of UUIDs of players who have redeemed the code.

Constructors

Link copied to clipboard
fun GuildCode(id: String, uses: Int, creator: UUID, redeemers: MutableList<UUID>)

Functions

Link copied to clipboard
fun addRedeemer(player: Player)

Adds a player to the list of redeemers and reduces the number of uses by 1.

Properties

Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard
var uses: Int