aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/example/commands/EnchantRuneCommand.java
diff options
context:
space:
mode:
authoringle <inglettronald@gmail.com>2022-09-23 03:49:56 -0500
committeringle <inglettronald@gmail.com>2022-09-23 03:49:56 -0500
commit033de65a180b64fc645036d142589f57956ea263 (patch)
tree301fcca8a63348313f66193932c60f6c19c95024 /src/main/java/com/example/commands/EnchantRuneCommand.java
parentcfcdcda458b2fe9fbe33bb81759dfd4e4fb3bcc0 (diff)
downloadDulkirMod-033de65a180b64fc645036d142589f57956ea263.tar.gz
DulkirMod-033de65a180b64fc645036d142589f57956ea263.tar.bz2
DulkirMod-033de65a180b64fc645036d142589f57956ea263.zip
Nothing works yet :+1:
Diffstat (limited to 'src/main/java/com/example/commands/EnchantRuneCommand.java')
-rw-r--r--src/main/java/com/example/commands/EnchantRuneCommand.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/com/example/commands/EnchantRuneCommand.java b/src/main/java/com/example/commands/EnchantRuneCommand.java
new file mode 100644
index 0000000..98296ae
--- /dev/null
+++ b/src/main/java/com/example/commands/EnchantRuneCommand.java
@@ -0,0 +1,23 @@
+package com.example.commands;
+
+import com.example.Settings;
+import com.example.commands.ClientCommandBase;
+import net.minecraft.client.Minecraft;
+import net.minecraft.command.CommandException;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.EnumChatFormatting;
+
+public class EnchantRuneCommand extends ClientCommandBase {
+
+ public EnchantRuneCommand() {
+ super("enchantrune");
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) throws CommandException {
+ Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(
+ EnumChatFormatting.BLACK+ "" + EnumChatFormatting.BOLD + "TOGGLED."));
+ Settings.EnchantRune = !Settings.EnchantRune;
+ }
+} \ No newline at end of file