Implements persistent storage of records

This commit is contained in:
2023-03-26 17:42:55 +02:00
parent 49eb0ac82c
commit 592f53ec9e
9 changed files with 199 additions and 30 deletions

View File

@ -32,9 +32,10 @@ public class CreateArenaCommand implements CommandExecutor {
return false;
}
//TODO: Make sure the arena name doesn't contain any unwanted characters
// Remove known characters that are likely to cause trouble if used in an arena name
String arenaName = arguments[0].replaceAll("[§ :=&]", "");
DropperArena arena = new DropperArena(arguments[0], player.getLocation());
DropperArena arena = new DropperArena(arenaName, player.getLocation());
Dropper.getInstance().getArenaHandler().addArena(arena);
commandSender.sendMessage("The arena was successfully created!");
return true;