Merge remote-tracking branch 'origin/master'

This commit is contained in:
noil 2021-02-24 16:39:09 -05:00
commit d5096b398b
1 changed files with 5 additions and 1 deletions

View File

@ -3,8 +3,10 @@ package me.rigamortis.seppuku.impl.module.movement;
import me.rigamortis.seppuku.api.event.EventStageable;
import me.rigamortis.seppuku.api.event.player.EventPlayerUpdate;
import me.rigamortis.seppuku.api.module.Module;
import me.rigamortis.seppuku.api.value.Value;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.gui.inventory.GuiEditSign;
import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
@ -16,6 +18,8 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
*/
public final class GuiMoveModule extends Module {
public final Value<Boolean> allowSignMove = new Value<Boolean>("AllowSignMove", new String[]{"sign", "allowsign", "as"}, "If enabled you will be able to move while in a sign GUI.", false);
public GuiMoveModule() {
super("GUIMove", new String[]{"InvMove", "InventoryMove", "GUIM"}, "Allows you to move while guis are open", "NONE", -1, ModuleType.MOVEMENT);
}
@ -25,7 +29,7 @@ public final class GuiMoveModule extends Module {
if (event.getStage() == EventStageable.EventStage.PRE) {
final Minecraft mc = Minecraft.getMinecraft();
if (mc.currentScreen instanceof GuiChat || mc.currentScreen == null) {
if (mc.currentScreen instanceof GuiChat || (!allowSignMove.getValue() && mc.currentScreen instanceof GuiEditSign) || mc.currentScreen == null) {
return;
}