aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/mixins/AccessorCommandHandler.java
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <roman.graef@gmail.com>2023-03-04 02:54:50 +0100
committerGitHub <noreply@github.com>2023-03-04 12:54:50 +1100
commit5dd063fbba6bde64806a7620541dc2d9bdf42871 (patch)
tree01aee1a743a32a0b2546513c59a43559ce3085fe /src/main/java/io/github/moulberry/notenoughupdates/mixins/AccessorCommandHandler.java
parentdb86c98e0c72b18663ef26cd46cef7d53c1d6414 (diff)
downloadnotenoughupdates-5dd063fbba6bde64806a7620541dc2d9bdf42871.tar.gz
notenoughupdates-5dd063fbba6bde64806a7620541dc2d9bdf42871.tar.bz2
notenoughupdates-5dd063fbba6bde64806a7620541dc2d9bdf42871.zip
Replace all commands in NEU with a brigadier implementation (#599)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/mixins/AccessorCommandHandler.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/AccessorCommandHandler.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/AccessorCommandHandler.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/AccessorCommandHandler.java
new file mode 100644
index 00000000..73d31196
--- /dev/null
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/AccessorCommandHandler.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2023 NotEnoughUpdates contributors
+ *
+ * This file is part of NotEnoughUpdates.
+ *
+ * NotEnoughUpdates is free software: you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * NotEnoughUpdates is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package io.github.moulberry.notenoughupdates.mixins;
+
+import net.minecraft.command.CommandHandler;
+import net.minecraft.command.ICommand;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.gen.Accessor;
+
+import java.util.Set;
+
+@Mixin(CommandHandler.class)
+public interface AccessorCommandHandler {
+ @Accessor("commandSet")
+ Set<ICommand> neuGetClientCommands();
+}