aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/GetkeyCommand.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-08-18 19:00:43 -0400
committerbowser0000 <bowser0000@gmail.com>2020-08-18 19:00:43 -0400
commit7d56e9f24622cc16b60c1e23c1affcb809bd6772 (patch)
tree77535f276fba28eb810c04131c4c7a01c0f4a380 /src/main/java/me/Danker/commands/GetkeyCommand.java
parent4bba146e8d7602ceda5bda4083bb1d1abe3198f1 (diff)
downloadSkyblockMod-7d56e9f24622cc16b60c1e23c1affcb809bd6772.tar.gz
SkyblockMod-7d56e9f24622cc16b60c1e23c1affcb809bd6772.tar.bz2
SkyblockMod-7d56e9f24622cc16b60c1e23c1affcb809bd6772.zip
Remove mandatory parameter from /getkey
No reason to have a parameter if you can't not have a parameter.
Diffstat (limited to 'src/main/java/me/Danker/commands/GetkeyCommand.java')
-rw-r--r--src/main/java/me/Danker/commands/GetkeyCommand.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/me/Danker/commands/GetkeyCommand.java b/src/main/java/me/Danker/commands/GetkeyCommand.java
index d32a56e..f06e66f 100644
--- a/src/main/java/me/Danker/commands/GetkeyCommand.java
+++ b/src/main/java/me/Danker/commands/GetkeyCommand.java
@@ -40,14 +40,10 @@ public class GetkeyCommand extends CommandBase implements ICommand {
if (cf.getString("api", "APIKey").equals("")) {
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "API key not set. Set your API key using /setkey."));
}
- else if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Your set API key is " + EnumChatFormatting.DARK_GREEN + cf.getString("api", "APIKey")));
- } else if (arg1[0].equalsIgnoreCase("clipboard")){
- clipboard.setContents(stringSelection, null);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Your set API key has been copied to the clipboard."));
- } else {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Wrong command usage: /getkey (clipboard)"));
- }
+
+ clipboard.setContents(stringSelection, null);
+ player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Your set API key is " + EnumChatFormatting.DARK_GREEN + cf.getString("api", "APIKey") + "\n" +
+ EnumChatFormatting.GREEN + "Your set API key has been copied to the clipboard."));
}