diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-04-15 18:20:30 +0900 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-04-15 18:20:30 +0900 |
commit | 30df3e578cef533cacedf737449bbd35d4ea5d11 (patch) | |
tree | 8463196ec6ffe0162cbb636189f4e373b8a81d72 /src/main/java/io/polyfrost/oneconfig/command | |
parent | ddca3a3232eff15a7130efda03e7e5c408554412 (diff) | |
download | OneConfig-30df3e578cef533cacedf737449bbd35d4ea5d11.tar.gz OneConfig-30df3e578cef533cacedf737449bbd35d4ea5d11.tar.bz2 OneConfig-30df3e578cef533cacedf737449bbd35d4ea5d11.zip |
fix shadow and add nanovg support
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/command')
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java | 29 |
1 files changed, 8 insertions, 21 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..c2e6447 100644 --- a/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java +++ b/src/main/java/io/polyfrost/oneconfig/command/OneConfigCommand.java @@ -2,20 +2,19 @@ package io.polyfrost.oneconfig.command; import io.polyfrost.oneconfig.gui.Window; import io.polyfrost.oneconfig.hud.gui.HudGui; +import io.polyfrost.oneconfig.test.TestNanoVGGui; import io.polyfrost.oneconfig.themes.Themes; 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(); @@ -49,27 +48,15 @@ public class OneConfigCommand implements ICommand { mc.thePlayer.addChatMessage(new ChatComponentText("reloading theme!")); Themes.openTheme(new File("OneConfig/themes/one.zip").getAbsoluteFile()); break; + 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; } } |