Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +01:00
Added fallback options on CommandHandler
Dieser Commit ist enthalten in:
Ursprung
098b787355
Commit
a3bfcefdca
@ -44,24 +44,26 @@ public class ViaVersionCommand implements CommandExecutor {
|
|||||||
|
|
||||||
sender.sendMessage(color("&8[&61.9&8]: &b" + portedPlayers.toString()));
|
sender.sendMessage(color("&8[&61.9&8]: &b" + portedPlayers.toString()));
|
||||||
sender.sendMessage(color("&8[&61.8&8]: &b" + normalPlayers.toString()));
|
sender.sendMessage(color("&8[&61.8&8]: &b" + normalPlayers.toString()));
|
||||||
}
|
} else if (args[0].equalsIgnoreCase("debug")) {
|
||||||
if (args[0].equalsIgnoreCase("debug")) {
|
|
||||||
plugin.setDebug(!plugin.isDebug());
|
plugin.setDebug(!plugin.isDebug());
|
||||||
sender.sendMessage(color("&6Debug mode is now " + (plugin.isDebug() ? "&aenabled" : "&cdisabled")));
|
sender.sendMessage(color("&6Debug mode is now " + (plugin.isDebug() ? "&aenabled" : "&cdisabled")));
|
||||||
}
|
} else if (args[0].equalsIgnoreCase("dontbugme")) {
|
||||||
if (args[0].equalsIgnoreCase("dontbugme")) {
|
|
||||||
boolean newValue = !plugin.getConfig().getBoolean("checkforupdates", true);
|
boolean newValue = !plugin.getConfig().getBoolean("checkforupdates", true);
|
||||||
plugin.getConfig().set("checkforupdates", newValue);
|
plugin.getConfig().set("checkforupdates", newValue);
|
||||||
plugin.saveConfig();
|
plugin.saveConfig();
|
||||||
sender.sendMessage(color("&6We will " + (newValue ? "&anotify you about updates." : "&cnot tell you about updates.")));
|
sender.sendMessage(color("&6We will " + (newValue ? "&anotify you about updates." : "&cnot tell you about updates.")));
|
||||||
}
|
} else if (args[0].equalsIgnoreCase("autoteam")) {
|
||||||
if (args[0].equalsIgnoreCase("autoteam")) {
|
|
||||||
boolean newValue = !plugin.getConfig().getBoolean("auto-team", true);
|
boolean newValue = !plugin.getConfig().getBoolean("auto-team", true);
|
||||||
plugin.getConfig().set("auto-team", newValue);
|
plugin.getConfig().set("auto-team", newValue);
|
||||||
plugin.saveConfig();
|
plugin.saveConfig();
|
||||||
sender.sendMessage(color("&6We will " + (newValue ? "&aautomatically team players" : "&cno longer auto team players")));
|
sender.sendMessage(color("&6We will " + (newValue ? "&aautomatically team players" : "&cno longer auto team players")));
|
||||||
sender.sendMessage(color("&6All players will need to re-login for the change to take place."));
|
sender.sendMessage(color("&6All players will need to re-login for the change to take place."));
|
||||||
|
} else {
|
||||||
|
sender.sendMessage(color("&aViaVersion &c" + ViaVersion.getInstance().getVersion()));
|
||||||
|
sender.sendMessage(color("&6Commands:"));
|
||||||
|
sender.sendMessage(color("&2/viaversion list &7- &6Shows lists of all 1.9 clients and 1.8 clients."));
|
||||||
|
sender.sendMessage(color("&2/viaversion autoteam &7- &6Toggle automatically teaming to prevent colliding."));
|
||||||
|
sender.sendMessage(color("&2/viaversion dontbugme &7- &6Toggle checking for updates."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren