MinigameAPI

Feb 20, 2019
MinigameAPI
  • Part 1: Creating a new game and basics
    Part 2: Customizing Plugin
    Wiki - Home Page (You Are Here)


    PLUGIN WORK IN PROGRESS, NOT UPLOADED TO SPIGOT

    Code (Text):
    MinigameAPI.createArena(String name); //Creates a new game called String name.
    Code (Text):
    MinigameAPI.removeArena(Arena arena); //Removes a game with given name.
    Code (Text):
    MinigameAPI.stopArena(Arena arena); //Removes a game with given name.
    Code (Text):
    MinigameAPI.getArena(String name); //Gets a game with given name.
    Code (Text):
    MinigameAPI.getArena(Player p); //Gets a game with given player.
    Code (Text):
    MinigameAPI.setMainLobby(Location loc); //Sets the main lobby to teleport
    Code (Text):
    MinigameAPI.addTeam(String name, TeamColor color); //Creates a new team.


    ARENA MANAGEMENT
    You must retrieve the arena first by using MinigameAPI.getArena(String name); or MinigameAPI.getArena(Player p)

    Example:
    Code (Text):
    Arena a = MinigameAPI.getArena(p);
    a.removePlayer(p);

    Code (Text):
    Arena.addPlayer(Player p); //Adds a player to current arena.
    Code (Text):
    Arena.removePlayer(Player p); //Removes a player.
    Code (Text):
    Arena.setState(ArenaState state); //Sets the arena as closed or open
    Code (Text):
    Arena.setMaxSize(int size); //Sets the maximum amount of players to join
    Code (Text):
    Arena.setWaitingLobby(); //Starts the waiting lobby where the player waits in before start
    Code (Text):
    Arena.setSpawn(TeamColor.COLOR); //Sets the spawn for team.
    Code (Text):
    Arena.start(); //Starts the current game
    Code (Text):
    Arena.stop(); //Force stops the current game and teleports everyone back to main lobby
    Code (Text):
    Arena.broadcast(String message); //Broadcasts a message to everyone in the arena
    Code (Text):
    Arena.setWinner(Player p); //Sets the current winner of the game to receive rewards
    Code (Text):
    Arena.getWinner(Player p); //Gets the current winner of the game
    Code (Text):
    Arena.stopGame(); //Stops game and teleports everyone to next game
  • Loading...
  • Loading...