mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-27 04:25:19 +01:00
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:
parent
7c4e967dd8
commit
2730b91598
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -36,7 +36,7 @@ public class SongodaCoreDiagCommand extends AbstractCommand {
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/songoda diag";
|
||||
return "/craftaro diag";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,7 +63,7 @@ public class SongodaCoreIPCommand extends AbstractCommand {
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/songoda myip";
|
||||
return "/craftaro myip";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -45,7 +45,7 @@ public class SongodaCoreUUIDCommand extends AbstractCommand {
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/songodacore uuid";
|
||||
return "/craftaro uuid";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user