ClaimUtils

ClaimUtils is a class that provides utility methods for claim management in a server game.

Functions

Link copied to clipboard
fun addMember(claim: IWrappedRegion, player: Player)

Adds a player to the members of the specified claim.

Link copied to clipboard
fun addMembers(claim: IWrappedRegion, guild: Guild)

Adds all members of the given guild as members of the given claim.

Link copied to clipboard
fun addOwner(claim: IWrappedRegion, guild: Guild)

Adds the given guild's guild master as an owner of the given claim.

Link copied to clipboard
fun checkAlreadyExist(wrapper: WorldGuardWrapper, guild: Guild): Boolean

Returns a boolean value indicating if a claim with the same name as the given guild already exists.

fun checkAlreadyExist(wrapper: WorldGuardWrapper, player: Player, name: String): Boolean

Returns a boolean value indicating if a claim with the given name already exists in the player's world.

Link copied to clipboard
fun checkOverlap(wrapper: WorldGuardWrapper, player: Player, settingsManager: SettingsManager): Boolean

Checks if the claim made by the player overlaps with any other regions

Link copied to clipboard
fun checkPvpDisabled(player: Player): Boolean

Check if the PvP is disabled for the player.

Link copied to clipboard
fun claimPointOne(player: Player, settingsManager: SettingsManager): Location

Returns the first point of a claim based on the player's location and the radius.

Link copied to clipboard
fun claimPointTwo(player: Player, settingsManager: SettingsManager): Location

Returns the second point of a claim based on the player's location and the radius.

Link copied to clipboard
fun createClaim(wrapper: WorldGuardWrapper, guild: Guild, selection: ICuboidSelection)

Creates a claim for the specified guild using the provided selection

fun createClaim(wrapper: WorldGuardWrapper, guild: Guild, player: Player, settingsManager: SettingsManager)

Creates a claim for the specified guild using the player's selection

Link copied to clipboard
fun deleteWithGuild(guild: Guild, settingsManager: SettingsManager)

Deletes the claim for the given guild.

Link copied to clipboard
fun getClaim(wrapper: WorldGuardWrapper, player: Player, name: String): Optional<IWrappedRegion>

Returns the claim with the given name for the given player.

Link copied to clipboard

Returns the name of a claim based on the given guild.

Link copied to clipboard
fun getGuildClaim(wrapper: WorldGuardWrapper, player: Player, guild: Guild): Optional<IWrappedRegion>

Returns the guild claim for the given guild and player.

Link copied to clipboard
fun getMembers(claim: IWrappedRegion): IWrappedDomain

Returns the members of the given claim.

Link copied to clipboard
fun getRadius(settingsManager: SettingsManager): Int

Returns the radius value used for creating a claim.

Link copied to clipboard
fun getSelection(wrapper: WorldGuardWrapper, player: Player, name: String): ICuboidSelection

Returns the cuboid selection for the claim with the given name for the given player.

Link copied to clipboard
fun isEnabled(settingsManager: SettingsManager): Boolean

Returns a boolean value indicating if the claim feature is enabled or not.

Link copied to clipboard
fun isInDisabledWorld(player: Player, settingsManager: SettingsManager): Boolean

Checks if the player's current world is disabled for claiming

Link copied to clipboard
fun kickMember(playerKicked: OfflinePlayer, playerExecuting: Player, guild: Guild, settingsManager: SettingsManager)

Kicks a player from the specified guild claim.

Link copied to clipboard
fun regions(wrapper: WorldGuardWrapper, player: Player, settingsManager: SettingsManager): Set<IWrappedRegion>

Returns a set of regions that overlap with the claim being made by the player

Link copied to clipboard
fun removeClaim(wrapper: WorldGuardWrapper, guild: Guild)

Removes the claim for the specified guild

Link copied to clipboard
fun removeMember(claim: IWrappedRegion, player: OfflinePlayer)

Removes a player from the members of the specified claim.

Link copied to clipboard
fun setEnterMessage(wrapper: WorldGuardWrapper, claim: IWrappedRegion, settingsManager: SettingsManager, guild: Guild)

Sets the greeting message for the specified claim.

Link copied to clipboard
fun setExitMessage(wrapper: WorldGuardWrapper, claim: IWrappedRegion, settingsManager: SettingsManager, guild: Guild)

Sets the farewell message for the specified claim.