aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java
index d51d4d2e..1ca398ef 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/AhCommand.java
@@ -22,10 +22,9 @@ package io.github.moulberry.notenoughupdates.commands.misc;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.auction.CustomAHGui;
import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
-import net.minecraft.client.Minecraft;
+import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
-import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import org.apache.commons.lang3.StringUtils;
@@ -38,12 +37,11 @@ public class AhCommand extends ClientCommandBase {
@Override
public void processCommand(ICommandSender sender, String[] args) throws CommandException {
if (!NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) {
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED +
- "You must be on SkyBlock to use this feature."));
+ Utils.addChatMessage(EnumChatFormatting.RED + "You must be on SkyBlock to use this feature.");
} else if (NotEnoughUpdates.INSTANCE.config.apiData.apiKey == null ||
NotEnoughUpdates.INSTANCE.config.apiData.apiKey.trim().isEmpty()) {
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED +
- "Can't open NEU AH: an api key is not set. Run /api new and put the result in settings."));
+ Utils.addChatMessage(
+ EnumChatFormatting.RED + "Can't open NEU AH: an api key is not set. Run /api new and put the result in settings.");
} else {
NotEnoughUpdates.INSTANCE.openGui = new CustomAHGui();
NotEnoughUpdates.INSTANCE.manager.auctionManager.customAH.lastOpen = System.currentTimeMillis();