EpicKnarvik97 57b3b85fbc Adds a new item to allow arena re-tries
Prevents a NumberFormatException if the record number is invalid
Updates Spigot to 1.20
2023-06-12 23:17:48 +02:00

28 lines
695 B
Java

package net.knarcraft.minigames.gui;
import net.knarcraft.minigames.MiniGames;
import org.bukkit.entity.Player;
/**
* A GUI used outside arenas
*/
public class MiniGamesGUI extends ArenaGUI {
/**
* Instantiates a new mini games gui
*
* @param player <p>The player the GUI is created for</p>
*/
public MiniGamesGUI(Player player) {
super(9, "MiniGames");
if (MiniGames.getInstance().getPlayerVisibilityManager().isHidingPlayers(player)) {
setItem(0, getTogglePlayersItemEnabled());
} else {
setItem(0, getTogglePlayersItemDisabled());
}
setAnyClickAction(0, getTogglePlayersAction(null));
}
}