mirror of
https://github.com/SunNetservers/MiniGames.git
synced 2025-04-03 10:16:26 +02:00
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
33 lines
774 B
Java
33 lines
774 B
Java
package net.knarcraft.dropper.util;
|
|
|
|
import net.knarcraft.dropper.Dropper;
|
|
import net.knarcraft.dropper.arena.DropperArena;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* A helper-class for common tab-completions
|
|
*/
|
|
public final class TabCompleteHelper {
|
|
|
|
private TabCompleteHelper() {
|
|
|
|
}
|
|
|
|
/**
|
|
* Gets the names of all current arenas
|
|
*
|
|
* @return <p>All arena names</p>
|
|
*/
|
|
public static @NotNull List<String> getArenas() {
|
|
List<String> arenaNames = new ArrayList<>();
|
|
for (DropperArena dropperArena : Dropper.getInstance().getArenaHandler().getArenas().values()) {
|
|
arenaNames.add(dropperArena.getArenaName());
|
|
}
|
|
return arenaNames;
|
|
}
|
|
|
|
}
|