MatchCore

public final class MatchCore

Entry point of the match core. Every plugin ships its own relocated copy of MagmaCore, so this registry only ever sees the owning plugin's matches. The player metadata marker under MARKER_KEY is what lets every copy see that a player is already taken.

Properties

Link copied to clipboard
public final static String MARKER_KEY

Functions

Link copied to clipboard
public static void enable(JavaPlugin owner)
Link copied to clipboard
public static Collection<Match> matches()
Link copied to clipboard
public static Match matchOf(Player player)
The match of this plugin the player takes part in, or null.
Link copied to clipboard
public static boolean moveOut(Player player, Location destination, PlayerTeleportEvent.TeleportCause cause)
Moves a player out of their match.
Link copied to clipboard
public static boolean moveWithin(Player player, Location destination, PlayerTeleportEvent.TeleportCause cause)
Moves a player inside one world.
Link copied to clipboard
public static void registerCustody(PlayerCustody custody)
Registers custody whose leases must be recovered when players join, for example after a crash.
Link copied to clipboard
public static void shutdown()
Destroys every match of this plugin with SHUTDOWN.
Link copied to clipboard
public static void sweepLeftoverWorlds()
Deletes unloaded temporary match worlds this plugin left behind, for example after a crash.