use of gg.projecteden.nexus.features.minigames.mechanics.common.CheckpointMechanic in project Nexus by ProjectEdenGG.
the class MinigamesCommand method autoreset.
@Path("autoreset [boolean]")
@Permission(PERMISSION_USE)
void autoreset(Boolean autoreset) {
Match match = minigamer.getMatch();
if (!minigamer.isPlaying())
error("You must be playing a checkpoint game to use that command");
if (!(match.getMechanic() instanceof CheckpointMechanic))
error("You are not in a checkpoint game");
CheckpointMatchData matchData = match.getMatchData();
matchData.autoreset(minigamer, autoreset);
if (matchData.isAutoresetting(minigamer))
send(PREFIX + "Enabled &eAuto Reset");
else
send(PREFIX + "Disabled &eAuto Reset");
}
Aggregations