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
This commit is contained in:
2023-03-23 13:00:05 +01:00
parent 724de147fd
commit 62450e8764
14 changed files with 431 additions and 58 deletions

View File

@ -3,16 +3,24 @@ package net.knarcraft.dropper.command;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
/**
* The command used to join a dropper arena
*/
public class JoinArenaCommand implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s,
@NotNull String[] strings) {
if (!(commandSender instanceof Player)) {
commandSender.sendMessage("This command must be used by a player");
return false;
}
//TODO: Implement command behavior
//TODO: Remember to check if the player is already in an arena first!
return false;
return true;
}
}