diff options
| author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-04-18 17:05:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-18 17:05:30 +0100 |
| commit | 2265233e317298db1da920430b8f8c21d6e3067e (patch) | |
| tree | a1339d9dfb2188100c7da55454605913d6773eb1 /src/main/java/io/polyfrost/oneconfig/command | |
| parent | a0a6032206ed0326653424c580b0b2900e357f29 (diff) | |
| parent | cf164be0c8f43c3d1387c9c9f7ae73c2cf1b3a02 (diff) | |
| download | OneConfig-2265233e317298db1da920430b8f8c21d6e3067e.tar.gz OneConfig-2265233e317298db1da920430b8f8c21d6e3067e.tar.bz2 OneConfig-2265233e317298db1da920430b8f8c21d6e3067e.zip | |
Merge pull request #3 from Wyvest/master
nanovg
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/command')
| -rw-r--r-- | src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java b/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java index df727a0..b210146 100644 --- a/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java +++ b/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java @@ -1,21 +1,16 @@ package io.polyfrost.oneconfig.command; -import io.polyfrost.oneconfig.gui.Window; import io.polyfrost.oneconfig.hud.gui.HudGui; -import io.polyfrost.oneconfig.themes.Themes; +import io.polyfrost.oneconfig.test.TestNanoVGGui; import io.polyfrost.oneconfig.utils.TickDelay; import net.minecraft.client.Minecraft; -import net.minecraft.command.ICommand; +import net.minecraft.command.CommandBase; import net.minecraft.command.ICommandSender; -import net.minecraft.util.BlockPos; -import net.minecraft.util.ChatComponentText; -import org.jetbrains.annotations.NotNull; -import java.io.File; import java.util.ArrayList; import java.util.List; -public class OneConfigCommand implements ICommand { +public class OneConfigCommand extends CommandBase { private static final Minecraft mc = Minecraft.getMinecraft(); @@ -39,37 +34,21 @@ public class OneConfigCommand implements ICommand { @Override public void processCommand(ICommandSender sender, String[] args) { - if (args.length == 0) new TickDelay(() -> mc.displayGuiScreen(new Window()), 1); + if (args.length == 0) ; //new TickDelay(() -> mc.displayGuiScreen(new Window()), 1); else { switch (args[0]) { case "hud": new TickDelay(() -> mc.displayGuiScreen(new HudGui()), 1); break; - case "theme": - mc.thePlayer.addChatMessage(new ChatComponentText("reloading theme!")); - Themes.openTheme(new File("OneConfig/themes/one.zip").getAbsoluteFile()); + case "lwjgl": + new TickDelay(() -> mc.displayGuiScreen(new TestNanoVGGui()), 1); break; } } } @Override - public boolean canCommandSenderUseCommand(ICommandSender sender) { - return true; - } - - @Override - public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { - return null; - } - - @Override - public boolean isUsernameIndex(String[] args, int index) { - return false; - } - - @Override - public int compareTo(@NotNull ICommand o) { - return 0; + public int getRequiredPermissionLevel() { + return -1; } } |
