use of au.com.mineauz.minigames.MinigameData in project Minigames by AddstarMC.
the class DisableAllCommand method onCommand.
@Override
public boolean onCommand(CommandSender sender, Minigame minigame, String label, String[] args) {
MinigameData mdata = Minigames.plugin.mdata;
List<Minigame> minigames = new ArrayList<Minigame>(mdata.getAllMinigames().values());
if (args != null) {
for (String arg : args) {
if (mdata.hasMinigame(arg))
minigames.remove(mdata.getMinigame(arg));
else
sender.sendMessage(ChatColor.RED + "No Minigame found by the name \"" + arg + "\"; Ignoring...");
}
}
for (Minigame mg : minigames) {
mg.setEnabled(false);
}
sender.sendMessage(ChatColor.GRAY + String.valueOf(minigames.size()) + " Minigames disabled!");
return true;
}
use of au.com.mineauz.minigames.MinigameData in project Minigames by AddstarMC.
the class EnableAllCommand method onCommand.
@Override
public boolean onCommand(CommandSender sender, Minigame minigame, String label, String[] args) {
MinigameData mdata = Minigames.plugin.mdata;
List<Minigame> minigames = new ArrayList<Minigame>(mdata.getAllMinigames().values());
if (args != null) {
for (String arg : args) {
if (mdata.hasMinigame(arg))
minigames.remove(mdata.getMinigame(arg));
else
sender.sendMessage(ChatColor.RED + "No Minigame found by the name \"" + arg + "\"; Ignoring...");
}
}
for (Minigame mg : minigames) {
mg.setEnabled(true);
}
sender.sendMessage(ChatColor.GRAY + String.valueOf(minigames.size()) + " Minigames enabled!");
return true;
}
Aggregations