aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/rosegoldaddons/commands/UseCooldown.java
diff options
context:
space:
mode:
authorRoseGoldIsntGay <yoavkau@gmail.com>2021-11-13 23:48:21 +0200
committerRoseGoldIsntGay <yoavkau@gmail.com>2021-11-13 23:48:21 +0200
commit471894a91cf02f42282f677472eb8bf07f270d5c (patch)
treed2b5fb6f1fb90c42236f9560214164f514197d1a /src/main/java/rosegoldaddons/commands/UseCooldown.java
parent6f69d1e1aff688bf2f5ca34754640eed5102b045 (diff)
downloadRGA-471894a91cf02f42282f677472eb8bf07f270d5c.tar.gz
RGA-471894a91cf02f42282f677472eb8bf07f270d5c.tar.bz2
RGA-471894a91cf02f42282f677472eb8bf07f270d5c.zip
2.2.0
Diffstat (limited to 'src/main/java/rosegoldaddons/commands/UseCooldown.java')
-rw-r--r--src/main/java/rosegoldaddons/commands/UseCooldown.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/rosegoldaddons/commands/UseCooldown.java b/src/main/java/rosegoldaddons/commands/UseCooldown.java
index 912c75a..45d78b0 100644
--- a/src/main/java/rosegoldaddons/commands/UseCooldown.java
+++ b/src/main/java/rosegoldaddons/commands/UseCooldown.java
@@ -9,6 +9,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import org.jetbrains.annotations.NotNull;
+import rosegoldaddons.utils.ChatUtils;
import java.util.ArrayList;
import java.util.HashMap;
@@ -42,20 +43,20 @@ public class UseCooldown implements ICommand {
int cd = Integer.parseInt(args[0]);
if (cd == 0) {
items.remove(curStack.getDisplayName());
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("§aSuccessfully Removed " + curStack.getDisplayName() + "§a."));
+ ChatUtils.sendMessage("§aSuccessfully Removed " + curStack.getDisplayName() + "§a.");
return;
}
if (cd < 1) {
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("§cInvalid Miliseconds, Minimum delay 1 Milisecond."));
+ ChatUtils.sendMessage("§cInvalid Miliseconds, Minimum delay 1 Milisecond.");
return;
}
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("§aSuccessfully Added " + curStack.getDisplayName() + "§a with delay of " + cd + " ms."));
+ ChatUtils.sendMessage("§aSuccessfully Added " + curStack.getDisplayName() + "§a with delay of " + cd + " ms.");
items.put(curStack.getDisplayName(), cd);
} else {
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("§cError getting current held item."));
+ ChatUtils.sendMessage("§cError getting current held item.");
}
} else {
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("§cInvalid Arguments."));
+ ChatUtils.sendMessage("§cInvalid Arguments.");
}
}