Challenge Handler
Created by Glare Date: 7/12/2019 Time: 2:50 PM
Constructors
Types
Functions
Link copied to clipboard
Add a challenge to the list
Link copied to clipboard
open fun announceDeath(@NotNull challenge: @NotNull GuildChallenge, @NotNull guilds: @NotNull Guilds, @NotNull player: @NotNull Player, @NotNull killer: @NotNull Player, @NotNull cause: @NotNull ChallengeHandler.Cause)
Announce when a player dies
Link copied to clipboard
open fun announceWinner(@NotNull challenge: @NotNull GuildChallenge, @NotNull commandManager: @NotNull PaperCommandManager)
Announce the winner to the guild
Link copied to clipboard
Make sure enough players joined the challenge
Link copied to clipboard
open fun checkEnoughOnline(@NotNull challenger: @NotNull Guild, @NotNull defender: @NotNull Guild, amount: Int): Boolean
Simple method to check if both guilds have enough players online
Link copied to clipboard
Check if a challenge is over because a team won
Link copied to clipboard
open fun createNewChallenge(@NotNull challenger: @NotNull Guild, @NotNull defender: @NotNull Guild, minPlayer: Int, maxPlayers: Int, @NotNull arena: @NotNull Arena): GuildChallenge
Create a new Guild Challenge
Link copied to clipboard
Teleport a player out of the arena
Link copied to clipboard
Get a list of active challenges
Link copied to clipboard
Get a combined map of all players
Link copied to clipboard
Get a challenge by it's uuid
Get a guild challenge by a guild
Get a challenge from a player
Link copied to clipboard
Get a list of the online war people for your guild
Link copied to clipboard
open fun giveRewards(@NotNull settingsManager: @NotNull SettingsManager, @NotNull challenge: @NotNull GuildChallenge)
Give the rewards to the winner
Link copied to clipboard
open fun handleFinish(@NotNull guilds: @NotNull Guilds, @NotNull settingsManager: @NotNull SettingsManager, @NotNull player: @NotNull Player, @NotNull challenge: @NotNull GuildChallenge)
Handle finishing of the arena war
Link copied to clipboard
Called when the plugin is first enabled to load all the challenges
Link copied to clipboard
open fun notOnCooldown(@NotNull guild: @NotNull Guild, @NotNull settingsManager: @NotNull SettingsManager): Boolean
Check to see if a Guild can be challenged
Link copied to clipboard
open fun pingOnlineDefenders(@NotNull guild: @NotNull Guild, @NotNull commandManager: @NotNull PaperCommandManager, @NotNull challenger: @NotNull String, acceptTime: Int)
Send a message to all online defenders
Link copied to clipboard
open fun prepareFinalList(@NotNull players: @NotNull List<UUID>, @NotNull challenge: @NotNull GuildChallenge, @NotNull team: @NotNull String)
Prepare the final list for a challenge
Link copied to clipboard
Removes a challenge from the list by the uuid
Remove a challenge from the list
Link copied to clipboard
Remove a player from a challenge
Link copied to clipboard
open fun sendToArena(@NotNull players: @NotNull Map<UUID, String>, @Nullable location: @Nullable Location)
Send players to arena
Link copied to clipboard
Teleport the remaining players back to their original location