Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 00:00:28 +01:00
Merge pull request #174 from Matsv/master
Add /viaversion debug to the commandlist
Dieser Commit ist enthalten in:
Commit
dfc1e1cf51
@ -20,16 +20,11 @@ public class ViaVersionCommand implements CommandExecutor {
|
|||||||
|
|
||||||
private final ViaVersionPlugin plugin;
|
private final ViaVersionPlugin plugin;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||||
if (sender.hasPermission("viaversion.admin")) {
|
if (sender.hasPermission("viaversion.admin")) {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
sender.sendMessage(color("&aViaVersion &c" + ViaVersion.getInstance().getVersion()));
|
sendHelp(sender);
|
||||||
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."));
|
|
||||||
} else if (args.length == 1) {
|
} else if (args.length == 1) {
|
||||||
if (args[0].equalsIgnoreCase("list")) {
|
if (args[0].equalsIgnoreCase("list")) {
|
||||||
List<String> portedPlayers = new ArrayList<>();
|
List<String> portedPlayers = new ArrayList<>();
|
||||||
@ -59,11 +54,7 @@ public class ViaVersionCommand implements CommandExecutor {
|
|||||||
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 {
|
} else {
|
||||||
sender.sendMessage(color("&aViaVersion &c" + ViaVersion.getInstance().getVersion()));
|
sendHelp(sender);
|
||||||
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."));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,6 +62,15 @@ public class ViaVersionCommand implements CommandExecutor {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sendHelp(CommandSender sender){
|
||||||
|
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 debug &7- &6Toggle debug mode"));
|
||||||
|
sender.sendMessage(color("&2/viaversion autoteam &7- &6Toggle automatically teaming to prevent colliding."));
|
||||||
|
sender.sendMessage(color("&2/viaversion dontbugme &7- &6Toggle checking for updates."));
|
||||||
|
}
|
||||||
|
|
||||||
public String color(String string) {
|
public String color(String string) {
|
||||||
return string.replace("&", "§");
|
return string.replace("&", "§");
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren