diff options
Diffstat (limited to 'mod/src')
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java index 74846206..1ea1cee1 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java @@ -49,6 +49,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import org.json.JSONObject; +import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -56,12 +57,25 @@ public class CommandDungeonsGuide extends CommandBase { @Override public String getCommandName() { - return "dg"; + return "dungeonsguide"; } @Override public String getCommandUsage(ICommandSender sender) { - return "dg"; + return "dungeonsguide"; + } + + @Override + public List<String> getCommandAliases() { + return new ArrayList<String>() {{ + add("dg"); //per issue #400 + add("dungeonguide"); //because people keep saying "dungeon guide" the singular + add("deegee"); //in case another mod/server somehow uses a command "/dg" and no one wants to type out the entire name "dungeonsguide" + add("던전가이드"); //easter egg + add("던전안내"); //easter egg + // for each new alias, make a new line, then: add("[INSERT YOUR ALIAS HERE]"); + // Shoutout to coobird for the anonymous inner class idea: stackoverflow.com/a/1005083 + }}; } //List of subcommands for tab support @@ -76,7 +90,8 @@ public class CommandDungeonsGuide extends CommandBase { "purge", "pbroadcast", "partymax", - "unload" + "unload", + "aliases" }; @Override @@ -133,6 +148,14 @@ public class CommandDungeonsGuide extends CommandBase { unloadCommand(); break; + + case "aliases": + ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide aliases§7::")); + ChatTransmitter.addToQueue(new ChatComponentText(" §7- §e/dungeonsguide")); + ChatTransmitter.addToQueue(new ChatComponentText(" §7- §e/dungeonguide")); + ChatTransmitter.addToQueue(new ChatComponentText(" §7- §e/deegee")); + break; + default: ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §e/dg §7-§fOpens configuration gui")); ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §e/dg gui §7-§fOpens configuration gui")); |