aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/SetkeyCommand.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-11-26 16:10:11 -0500
committerGitHub <noreply@github.com>2020-11-26 16:10:11 -0500
commit016814851e46acdbc7a8fce44746eb67feef5905 (patch)
treeb39ca6496c233efe327dcdff0379f50b5cc6e243 /src/main/java/me/Danker/commands/SetkeyCommand.java
parent292f5dde43c3e00b78e1d4e772ae336340b0a834 (diff)
parent16f1cd3c009184e8c8f5c75b9afae9ca531d2fee (diff)
downloadSkyblockMod-1.8.2.tar.gz
SkyblockMod-1.8.2.tar.bz2
SkyblockMod-1.8.2.zip
Merge pull request #30 from bowser0000/development
Diffstat (limited to 'src/main/java/me/Danker/commands/SetkeyCommand.java')
-rw-r--r--src/main/java/me/Danker/commands/SetkeyCommand.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/me/Danker/commands/SetkeyCommand.java b/src/main/java/me/Danker/commands/SetkeyCommand.java
index 9fc5228..f2e58e5 100644
--- a/src/main/java/me/Danker/commands/SetkeyCommand.java
+++ b/src/main/java/me/Danker/commands/SetkeyCommand.java
@@ -1,5 +1,6 @@
package me.Danker.commands;
+import me.Danker.TheMod;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
@@ -7,7 +8,6 @@ import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
public class SetkeyCommand extends CommandBase implements ICommand {
@@ -31,13 +31,12 @@ public class SetkeyCommand extends CommandBase implements ICommand {
final EntityPlayer player = (EntityPlayer)arg0;
if (arg1.length == 0) {
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0)));
+ player.addChatMessage(new ChatComponentText(TheMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0)));
return;
}
- final ConfigHandler cf = new ConfigHandler();
- cf.writeStringConfig("api", "APIKey", arg1[0]);
- player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Set API key to " + EnumChatFormatting.DARK_GREEN + arg1[0]));
+ ConfigHandler.writeStringConfig("api", "APIKey", arg1[0]);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Set API key to " + TheMod.SECONDARY_COLOUR + arg1[0]));
}
}