From ee5597ec6133f8306144d114ad99df514bc7400d Mon Sep 17 00:00:00 2001 From: Bella Date: Mon, 13 Jan 2020 09:20:11 -0500 Subject: [PATCH] add defaults button to elytraflight --- .../modules/zeroeightysix/movement/ElytraFlight.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/zeroeightysix/movement/ElytraFlight.java b/src/main/java/me/zeroeightsix/kami/module/modules/zeroeightysix/movement/ElytraFlight.java index 59cfad4b..06160fe6 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/zeroeightysix/movement/ElytraFlight.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/zeroeightysix/movement/ElytraFlight.java @@ -1,5 +1,6 @@ package me.zeroeightsix.kami.module.modules.zeroeightysix.movement; +import me.zeroeightsix.kami.command.Command; import me.zeroeightsix.kami.module.Module; import me.zeroeightsix.kami.setting.Setting; import me.zeroeightsix.kami.setting.Settings; @@ -17,14 +18,22 @@ public class ElytraFlight extends Module { private Setting mode = register(Settings.e("Mode", ElytraFlightMode.FLY)); private Setting highway = register(Settings.b("Highway Mode", false)); + private Setting defaultSetting = register(Settings.b("Defaults", false)); private Setting speed = register(Settings.f("Speed", 1.8f)); - private Setting fallspeed = register(Settings.f("Fall Speed", .000050000002f)); + private Setting fallspeed = register(Settings.f("Fall Speed", 0.000050000002f)); // private Float fallspeed = .000050000002f; @Override public void onUpdate() { + if (defaultSetting.getValue()) { + speed.setValue(1.8f); + fallspeed.setValue(.000050000002f); + defaultSetting.setValue(false); + Command.sendChatMessage("[ElytraFlight] Set to defaults!"); + } + if (highway.getValue()) { mode.setValue(ElytraFlightMode.FLY); }