This is a completely functional minigame handler.
Primarily it is an API, to be used as a very easy and quick way to build other minigames. I have been able to use this API to build a complete One-In-The-Quiver game in under 1 hour.
However, it can also be used as it's own standalone minigame, a speed-punching 'brawl' game where the only goal is to eliminate the other players as fast as possible. Complete with a configurable double-jump feature and starting potion effects, all you would need to do is build a suitable map and start playing.
Current gamemodes Bodycount - whoever gets X eliminations first
Hourglass - whoever has the most eliminations in X time
Last Man Standing - one life per person, last one alive wins
Custom - extend the BaseGame class in your own plugin
Custom listenable game Events PlayerJoinGameEvent - called when a player joins the game and gets added to the Contestants list. Intercept and change the spawn location if your game has a waiting lobby.
CountdownBeginEvent - called when the game is in stasis and has enough players to start (configurable, as low as 1; ignores players in creative). Change the timer ticks to determine how long it counts down.
GameBeginEvent - called when the timer ends and there are still enough players to start. Change the PregameSpawnLocation to set where players will spawn if there aren't enough players and the game goes into stasis.
GameDamageEvent - called when a player is damaged. Primarily for internal use. Cancel this to cancel the base damage event.
PlayerCombatEvent - called when a player is damaged by another player. Intercept to adjust who the attacker is, what the combat timer will be, and more.
PlayerDoubleJumpEvent - called when a player succeeds in double-jumping. This occurs when a player attempts to toggle flight. Once a player has jumped, landing on a block is required before another double-jump is required.
PlayerEliminateEvent - called when a player has been eliminated. In the case of respawning gamemodes, the player can still respawn after 'elimination'.
GameTerminateEvent - called when a game has ended. For different gamemodes, this will be under differing circumstances. A custom gamemode is a good way to change what constitutes a game terminating.
GameWinEvent - called when a game has been terminated, if the win condition set within the gamemode has been met.
DEFAULT FEATURES Basic win effect: the winner is awarded the glowing (spectral) effect for several seconds while the timer counts down again.
Pre-game immunity: Falling out of the world or taking damage in any way is cancelled until the game begins. Upon falling out of the world, players are instantly teleported back to the spawnpoint.
Zero Hit Cooldown: Punches are landed just as fast as you can throw them. The damage timer is set to an effective zero, as well as the hit timer. This can be changed by using this plugin as an API.
Scorekeeping:
When you win a round, you are rewarded with 1/10th of a level of Exp. So at Exp level 12, you will have won 120 rounds. This was changed in 0.3, so that in the future the XP bar can be used by other plugins for cooldowns or other data display. There is a scoreboard on the side of the screen that keeps track of the top 3 players. At the moment, this is bugged. But it can be overwritten by using this plugin as an API.
COMMANDS Currently there are two commands, and no permissions. You must be opped in order to use these commands.
setspawn: sets the spawn location for all players. This can be interrupted at any or all custom events in order to implement waiting lobbies, multiple spawn locations, and more. setpots: sets the default potion effects for all players. This is set to whatever potion effects you have active at the time of the command.
THINGS TO KNOW The following code is run when the plugin is enabled.
This sets up the play environment. When a player joins while a game is in action, they join in Spectator mode. When a player joins during a countdown or while waiting for the minimum number of players, they join and remain in Adventure mode.
The food level of all players will not change throughout the game unless another plugin overrides this.
If you have any questions or concerns, feel free to email me at
[email protected] or message me from my
Spigot profile.
My Discord server can be joined by clicking
HERE.