# NOT MinigameAPI - noma ## Features - Dynamic Phases - e.g. Lobby, MapVoting, DeathmatchMapVoting, Jump, Shop, PvP, Done - map loading per phase - custom map loader -> `load(): World` - useful for custom map generation (tryjump) - phase settings - can join game (if not = spectator) - teleport on start (teleport locations by actor) - `setPhase()` - set the phase explicitly - `nextPhase()` - go to the next phase in order (if there is one) - Statistics Management - Actor - abstraction layer players and teams - used for determining winning/losing player/teams - implements spigot `Player` interface - `getActorName()` - `getColor()` - `getPlayers()` - `sendMessage()` - `sendTitle()` - Teleport - `TeleportType` - teleport randomly or by order - `teleport(vararg locations: Location)` - `teleport(type: TeleportType, vararg locations: Location)` - `apply(executor: (Player) -> Unit)` - ... - Actor Selection - in lobby phase, players can select their actor (if max players per actor is not reached) - Abstract voting system (not tied to maps) - per phase - any amount of results (depending on the phase configuration) - `Votable` interface - `VotableMap` - `VotableGame` - ... - Pool (vorable items) - Timer - Scoreboards - Spectator Mode - Bukkit Events - Commands ```yaml= --- # pools/mappools.yaml pools: - kind: network.cow.minigame.common.MapPool name: deathmatch location: /opt/maps items: - map1 - map2 - map3 --- # pools/otherpools.yaml pools: # context: Pixlers - kind: network.cow.minigame.common.StringPool name: topics items: - pixlers.words.shoe # translation key - pixlers.words.cock - pixlers.words.titanium --- # phases.yaml phases: - name: lobbyphase kind: network.cow.minigame.common.LobbyPhase phaseEndCountdown: duration: 30 timeout: duration: 900 - id: deathmachvotingphase kind: network.cow.minigame.common.phase.VotingPhase pool: pools/deathmatch options: 3 votesPerPlayer: 1 selector: kind: network.cow.minigame.common.RandomSelector # extra options for selector phaseEndCountdown: duration: 0 timeout: duration: 30 ``` ```kotlin= // WorldLoader override fun load(): World { val phaseId = "deathmachvotingphase" val result = game.getPhaseResult(phaseId) as MapVotingResult return result.getMaps().first() } ```