Interface SetupSelectionAPI<P,L>

Type Parameters:
P - the player type (platform-specific)
L - the location type (platform-specific)

public interface SetupSelectionAPI<P,L>
API for retrieving player position selections during arena setup.

Players use a selection tool (magic stick) to mark two positions (corners) for defining regions, bounds, or other spatial game configuration. This API provides access to those selections. Available from SetupContext.

  • Method Summary

    Modifier and Type
    Method
    Description
    getPosition1(P player)
    Gets the player's first selected position.
    getPosition2(P player)
    Gets the player's second selected position.
    boolean
    Checks if a player has selected both positions (pos1 and pos2).
  • Method Details

    • hasCompleteSelection

      boolean hasCompleteSelection(P player)
      Checks if a player has selected both positions (pos1 and pos2).
      Parameters:
      player - the player to check
      Returns:
      true if the player has both positions selected, false otherwise
    • getPosition1

      L getPosition1(P player)
      Gets the player's first selected position.
      Parameters:
      player - the player
      Returns:
      the first position, or null if not selected
    • getPosition2

      L getPosition2(P player)
      Gets the player's second selected position.
      Parameters:
      player - the player
      Returns:
      the second position, or null if not selected