diff --git a/src/main/java/me/rigamortis/seppuku/impl/module/misc/VisualRangeModule.java b/src/main/java/me/rigamortis/seppuku/impl/module/misc/VisualRangeModule.java index b5e7f38..c269dfe 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/module/misc/VisualRangeModule.java +++ b/src/main/java/me/rigamortis/seppuku/impl/module/misc/VisualRangeModule.java @@ -6,6 +6,7 @@ import me.rigamortis.seppuku.api.event.world.EventAddEntity; import me.rigamortis.seppuku.api.event.world.EventRemoveEntity; import me.rigamortis.seppuku.api.friend.Friend; import me.rigamortis.seppuku.api.module.Module; +import me.rigamortis.seppuku.api.value.Value; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; @@ -16,6 +17,12 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; */ public final class VisualRangeModule extends Module { + public final Value mode = new Value("Mode", new String[]{"Mode", "M"}, "Change between alert modes.", Mode.NOTIFICATION); + + private enum Mode { + CHAT, NOTIFICATION, BOTH + } + private int prevPlayer = -1; public VisualRangeModule() { @@ -27,8 +34,15 @@ public final class VisualRangeModule extends Module { if (Minecraft.getMinecraft().world != null && !Minecraft.getMinecraft().player.isDead && event.getEntity() instanceof EntityPlayer && !event.getEntity().getName().equalsIgnoreCase(Minecraft.getMinecraft().player.getName())) { final Friend friend = Seppuku.INSTANCE.getFriendManager().isFriend(event.getEntity()); final String msg = (friend != null ? ChatFormatting.DARK_PURPLE : ChatFormatting.RED) + (friend != null ? friend.getAlias() : event.getEntity().getName()) + ChatFormatting.WHITE + " has entered your visual range."; - Seppuku.INSTANCE.getNotificationManager().addNotification("", msg); - Seppuku.INSTANCE.logChat(msg); + + if (this.mode.getValue() == Mode.NOTIFICATION || this.mode.getValue() == Mode.BOTH) { + Seppuku.INSTANCE.getNotificationManager().addNotification("", msg); + } + + if (this.mode.getValue() == Mode.CHAT || this.mode.getValue() == Mode.BOTH) { + Seppuku.INSTANCE.logChat(msg); + } + if (event.getEntity().getEntityId() == this.prevPlayer) { this.prevPlayer = -1; } @@ -42,8 +56,14 @@ public final class VisualRangeModule extends Module { this.prevPlayer = event.getEntity().getEntityId(); final Friend friend = Seppuku.INSTANCE.getFriendManager().isFriend(event.getEntity()); final String msg = (friend != null ? ChatFormatting.DARK_PURPLE : ChatFormatting.RED) + (friend != null ? friend.getAlias() : event.getEntity().getName()) + ChatFormatting.WHITE + " has left your visual range."; - Seppuku.INSTANCE.getNotificationManager().addNotification("", msg); - Seppuku.INSTANCE.logChat(msg); + + if (this.mode.getValue() == Mode.NOTIFICATION || this.mode.getValue() == Mode.BOTH) { + Seppuku.INSTANCE.getNotificationManager().addNotification("", msg); + } + + if (this.mode.getValue() == Mode.CHAT || this.mode.getValue() == Mode.BOTH) { + Seppuku.INSTANCE.logChat(msg); + } } } } diff --git a/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java b/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java index a8ba404..cca10e5 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java +++ b/src/main/java/me/rigamortis/seppuku/impl/module/movement/ElytraFlyModule.java @@ -38,7 +38,7 @@ public final class ElytraFlyModule extends Module { public final Value speed = new Value("Speed", new String[]{"Spd", "amount", "s"}, "Speed multiplier for elytra flight, higher values equals more speed.", 1.0f, 0.0f, 5.0f, 0.01f); public final Value autoStart = new Value("AutoStart", new String[]{"AutoStart", "start", "autojump", "as"}, "Hold down the jump key to have an easy automated lift off.", true); - public final Value autoStartDelay = new Value("StartDelay", new String[]{"AutoStartDelay", "startdelay", "autojumpdelay", "asd"}, "Delay(ms) between auto-start attempts.", 50.0f, 0.0f, 1000.0f, 10.0f); + public final Value autoStartDelay = new Value("StartDelay", new String[]{"AutoStartDelay", "startdelay", "autojumpdelay", "asd"}, "Delay(ms) between auto-start attempts.", 20.0f, 0.0f, 1000.0f, 5.0f); public final Value autoEquip = new Value("AutoEquip", new String[]{"AutoEquipt", "AutoElytra", "Equip", "Equipt", "ae"}, "Automatically equips a durable elytra before or during flight. (inventory only, not hotbar!)", false); public final Value autoEquipDelay = new Value("EquipDelay", new String[]{"AutoEquipDelay", "AutoEquiptDelay", "equipdelay", "aed"}, "Delay(ms) between elytra equip swap attempts.", 200.0f, 0.0f, 1000.0f, 10.0f); public final Value stayAirborne = new Value("StayAirborne", new String[]{"Airborne", "StayInAir", "air", "sa"}, "Attempts to always keep the player airborne (only use when AutoEquip is enabled).", false);