This framework was built with the purpose of making arena based minigames such as woolwars, sumo, skywars etc. However with minimal addition of an arena loader and other interfaces it can likely be adapted to work with any minigame.
All minigame state is contained within or linked to an instance of Game. Each Game instance must have an ActiveArena tied to the game at all times as many different modules are tied into this (e.g Spectators)
A game is created using the builder pattern, and is provided the arena, event manager, and the teams fighting in the match. The following code snippet is taken from the Development module SumoGameStarter
Game game = Game.builder(InariDemo.getInstance(), load, eventManager, teams,
(game1, previousRound) -> new SumoRound(game1, (SumoRound) previousRound),
(game1, previousRound) -> new SumoRound(game1, (SumoRound) previousRound),
(game1, previousRound) -> new SumoRound(game1, (SumoRound) previousRound),
(game1, previousRound) -> new SumoRound(game1, (SumoRound) previousRound),
(game1, previousRound) -> new SumoRound(game1, (SumoRound) previousRound))
.setPlayerSpawnHandler(new TeamBasedSpawning("spawn"))
.setSpectatorSpawnHandler(new SumoSpectatorSpawnFinder())
.build();
The flow of the gamemode is tied directly to your use of Rounds. A round can signify a literal round within the minigame or be used to manage state and flow. Within the Development module, specifically the sumo minigame, you can see how Rounds can be used to manage the pre-game, fighting, and post game states.
YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.