Have songoda-Command have 'craftaro' as alias and change wording to that

Not having the actuall command change allows of other plugins *finding* that command
in that way means not introducing a breaking change by accident ^^

+ It's very hacky the way I did it but tbh... Core v3 is somewhat around the corner anyways
This commit is contained in:
Christian Koop 2023-04-13 11:22:04 +02:00
parent 7c4e967dd8
commit 2730b91598
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
6 changed files with 11 additions and 7 deletions

View File

@ -372,6 +372,10 @@ public class CommandManager implements CommandExecutor, TabCompleter {
// Set tab complete
commandObject.setTabCompleter(tabManager);
if (command.equalsIgnoreCase("songoda")) {
commandObject.setAliases(Collections.singletonList("craftaro"));
}
// Register the command
Field fieldKnownCommands = SimpleCommandMap.class.getDeclaredField("knownCommands");
fieldKnownCommands.setAccessible(true);

View File

@ -65,7 +65,7 @@ public class MainCommand extends AbstractCommand {
.sendTo(sender);
}
sender.sendMessage(ChatColor.DARK_GRAY + "- " + ChatColor.YELLOW + "/songoda" + ChatColor.GRAY + " - Opens the Songoda plugin GUI");
sender.sendMessage(ChatColor.DARK_GRAY + "- " + ChatColor.YELLOW + "/craftaro" + ChatColor.GRAY + " - Opens the Craftaro plugin GUI");
sender.sendMessage("");
if (nestedCommands != null) {

View File

@ -12,7 +12,7 @@ public class SongodaCoreCommand extends AbstractCommand {
protected GuiManager guiManager;
public SongodaCoreCommand() {
super(false, "songoda");
super(CommandType.CONSOLE_OK, "craftaro", "songoda");
}
@Override
@ -24,7 +24,7 @@ public class SongodaCoreCommand extends AbstractCommand {
guiManager.showGUI((Player) sender, new SongodaCoreOverviewGUI());
} else {
sender.sendMessage("/songoda diag");
sender.sendMessage("/craftaro diag");
}
return ReturnType.SUCCESS;
@ -37,7 +37,7 @@ public class SongodaCoreCommand extends AbstractCommand {
@Override
public String getSyntax() {
return "/songoda";
return "/craftaro";
}
@Override

View File

@ -36,7 +36,7 @@ public class SongodaCoreDiagCommand extends AbstractCommand {
@Override
public String getSyntax() {
return "/songoda diag";
return "/craftaro diag";
}
@Override

View File

@ -63,7 +63,7 @@ public class SongodaCoreIPCommand extends AbstractCommand {
@Override
public String getSyntax() {
return "/songoda myip";
return "/craftaro myip";
}
@Override

View File

@ -45,7 +45,7 @@ public class SongodaCoreUUIDCommand extends AbstractCommand {
@Override
public String getSyntax() {
return "/songodacore uuid";
return "/craftaro uuid";
}
@Override