Interface BedWars.ArenaUtil

Enclosing interface:
BedWars

public static interface BedWars.ArenaUtil
  • Method Summary

    Modifier and Type Method Description
    void destroyReJoins​(CachedArena arena)
    Destroy available rejoins for the given arena.
    void disableArena​(CachedArena a)
    Remove an arena and destroy its data.
    CachedArena getArena​(java.lang.String server, java.lang.String remoteIdentifier)
    Get an arena by server and map identifier.
    RemoteReJoin getReJoin​(java.util.UUID player)
    Get available rejoin session for a player.
    boolean joinRandomArena​(org.bukkit.entity.Player p)
    Add a player to the most filled arena.
    boolean joinRandomFromGroup​(org.bukkit.entity.Player p, java.lang.String group)
    Add a player to the most filled arena from a group.
  • Method Details

    • destroyReJoins

      void destroyReJoins​(CachedArena arena)
      Destroy available rejoins for the given arena.
      Parameters:
      arena - target arena.
    • getReJoin

      @Nullable RemoteReJoin getReJoin​(java.util.UUID player)
      Get available rejoin session for a player.
      Parameters:
      player - player uuid.
      Returns:
      NULL if not found.
    • getArena

      @Nullable CachedArena getArena​(java.lang.String server, java.lang.String remoteIdentifier)
      Get an arena by server and map identifier.
      Parameters:
      server - server id.
      remoteIdentifier - remote map identifier.
      Returns:
      arena.
    • joinRandomFromGroup

      boolean joinRandomFromGroup​(@NotNull org.bukkit.entity.Player p, java.lang.String group)
      Add a player to the most filled arena from a group.
      Parameters:
      p - target player.
      group - arena group.
      Returns:
      true if joined successfully.
    • joinRandomArena

      boolean joinRandomArena​(@NotNull org.bukkit.entity.Player p)
      Add a player to the most filled arena. Check if is the party owner first.
      Parameters:
      p - target player.
      Returns:
      true if joined successfully.
    • disableArena

      void disableArena​(CachedArena a)
      Remove an arena and destroy its data.
      Parameters:
      a - arena.