8 Commits

Author SHA1 Message Date
3626d997b8 Implements #2 and #4
Adds a unique identifier to arenas
Stores frequently updated arena data separately from arena settings
Stores arenas keyed by their id
Prepares for storage of which players have beaten an arena
2023-03-27 21:43:16 +02:00
9a7d3ca360 Implements #5 and stuff
Uses a player entry state to store and restore a player's state such as game-mode and fly-mode.
Removes the restriction of fly mode and game-mode, and sets all arena players to adventure mode.
Force-quits all sessions when exiting the plugin.
Prevents usage of any commands other than the leave command when playing in an arena.
2023-03-27 14:23:55 +02:00
592f53ec9e Implements persistent storage of records 2023-03-26 17:42:55 +02:00
0c58860026 Adds a lot of small improvements
Makes the type of block players have to hit to win configurable
Separates the velocity option into vertical and horizontal velocities
Reduces some redundancy when getting an arena from an arena name
Partially implements the list command
Tries to improve the handling of players exiting in the middle of a session
Adds missing comments to ArenaStorageKey
2023-03-25 23:18:03 +01:00
eb67705300 Fixes various smaller issues
Fixes players immediately being thrown out because the spawn teleportation triggered the PlayerLeaveListener
Reduces default velocity from the insane terminal velocity to just 1
Uses UUID instead of player object when storing dropper arena sessions
Prevents players from joining an arena if in creative, spectator mode, or is flying
Implements the leave command to allow leaving the arena
Only counts fall damage as a loss, but still prevents all damage in the arena
Prevents players from dying of fall damage when exiting the dropper arena
Prevents loadArenas from returning null
2023-03-24 13:15:56 +01:00
62450e8764 Adds various necessary code
Moves code for keeping track of players to DropperArenaPlayerRegistry
Adds a DropperArenaRecordsRegistry for keeping track of records
Stores playing players as DropperArenaSession to be able to store more metadata
Adds an enum for different arena game-modes
Adds a record result enum for defining which kind of record a player achieved (personal or global)
Adds a helper-class for teleporting a player to and from arenas
2023-03-23 13:00:05 +01:00
730ef3fa13 Expands DropperArenaHandler
Adds storage of currently playing players to DropperArenaHandler
Adds methods for getting, adding and removing arenas to DropperArenaHandler
Adds more annotations in some places
2023-03-22 11:39:25 +01:00
bcde657fdd Adds code for saving and loading arenas 2023-03-22 10:23:04 +01:00