aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/example/CrashCommand.java
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-01-26 13:54:10 +0100
committerLinnea Gräf <nea@nea.moe>2024-01-26 13:54:10 +0100
commit4eb2056f2f20366ea49a7cf54d892bd3f25bdb16 (patch)
tree3268f0ea22a395365502556a115ec3580dee565c /src/main/java/com/example/CrashCommand.java
parentd449a6860bdfd4994caddf6b37e0792e439a52d3 (diff)
downloadforge1.8.9template-4eb2056f2f20366ea49a7cf54d892bd3f25bdb16.tar.gz
forge1.8.9template-4eb2056f2f20366ea49a7cf54d892bd3f25bdb16.tar.bz2
forge1.8.9template-4eb2056f2f20366ea49a7cf54d892bd3f25bdb16.zip
Tutorial stuff
Diffstat (limited to 'src/main/java/com/example/CrashCommand.java')
-rw-r--r--src/main/java/com/example/CrashCommand.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/com/example/CrashCommand.java b/src/main/java/com/example/CrashCommand.java
new file mode 100644
index 0000000..516708d
--- /dev/null
+++ b/src/main/java/com/example/CrashCommand.java
@@ -0,0 +1,27 @@
+package com.example;
+
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.CommandException;
+import net.minecraft.command.ICommandSender;
+
+public class CrashCommand extends CommandBase {
+ @Override
+ public String getCommandName() {
+ return "crashme";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "";
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) throws CommandException {
+ ExampleMod.screenToOpenNextTick = new MyGuiScreen();
+ }
+
+ @Override
+ public boolean canCommandSenderUseCommand(ICommandSender sender) {
+ return true;
+ }
+}