aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/gui/crystalhollowwaypoints/CrystalHollowWaypointsGui.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-04-16 20:52:59 -0400
committerbowser0000 <bowser0000@gmail.com>2022-04-16 20:52:59 -0400
commit637d39e2dad83b29503a1b12fc8e2f7f9e1489fa (patch)
treeaa910a2906cbd618f6ea26552b36281e01d28388 /src/main/java/me/Danker/gui/crystalhollowwaypoints/CrystalHollowWaypointsGui.java
parent7af45a9bee936d6da43e8b9ee6473a8ecbcb3d7f (diff)
downloadSkyblockMod-637d39e2dad83b29503a1b12fc8e2f7f9e1489fa.tar.gz
SkyblockMod-637d39e2dad83b29503a1b12fc8e2f7f9e1489fa.tar.bz2
SkyblockMod-637d39e2dad83b29503a1b12fc8e2f7f9e1489fa.zip
Add auto add player waypoints
Diffstat (limited to 'src/main/java/me/Danker/gui/crystalhollowwaypoints/CrystalHollowWaypointsGui.java')
-rw-r--r--src/main/java/me/Danker/gui/crystalhollowwaypoints/CrystalHollowWaypointsGui.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/gui/crystalhollowwaypoints/CrystalHollowWaypointsGui.java b/src/main/java/me/Danker/gui/crystalhollowwaypoints/CrystalHollowWaypointsGui.java
index fc0f108..7c54c98 100644
--- a/src/main/java/me/Danker/gui/crystalhollowwaypoints/CrystalHollowWaypointsGui.java
+++ b/src/main/java/me/Danker/gui/crystalhollowwaypoints/CrystalHollowWaypointsGui.java
@@ -1,5 +1,6 @@
package me.Danker.gui.crystalhollowwaypoints;
+import javafx.scene.control.Toggle;
import me.Danker.commands.ToggleCommand;
import me.Danker.features.CrystalHollowWaypoints;
import me.Danker.gui.DankerGui;
@@ -29,6 +30,7 @@ public class CrystalHollowWaypointsGui extends GuiScreen {
private GuiButton add;
private FeatureButton crystalHollowWaypoints;
private FeatureButton crystalAutoWaypoints;
+ private FeatureButton crystalAutoPlayerWaypoints;
public CrystalHollowWaypointsGui(int page) {
this.page = page;
@@ -55,11 +57,13 @@ public class CrystalHollowWaypointsGui extends GuiScreen {
add = new GuiButton(0, 0, 0, "Add Waypoint");
crystalHollowWaypoints = new FeatureButton("Crystal Hollows Waypoints: " + Utils.getColouredBoolean(ToggleCommand.crystalHollowWaypoints), "Shows waypoints to various places in the Crystal Hollows.");
crystalAutoWaypoints = new FeatureButton("Auto Waypoints: " + Utils.getColouredBoolean(ToggleCommand.crystalAutoWaypoints), "Automatically creates waypoints when you visit a special place in the Crystal Hollows.");
+ crystalAutoPlayerWaypoints = new FeatureButton("Auto Add Player Waypoints: " + Utils.getColouredBoolean(ToggleCommand.crystalAutoPlayerWaypoints), "Automatically adds waypoints sent from players.");
allButtons.clear();
allButtons.add(add);
allButtons.add(crystalHollowWaypoints);
allButtons.add(crystalAutoWaypoints);
+ allButtons.add(crystalAutoPlayerWaypoints);
for (int i = 0; i < CrystalHollowWaypoints.waypoints.size(); i++) {
CrystalHollowWaypoints.Waypoint waypoint = CrystalHollowWaypoints.waypoints.get(i);
GuiButton button = new GuiButton(i, 0, 0, waypoint.location + " >");
@@ -135,6 +139,10 @@ public class CrystalHollowWaypointsGui extends GuiScreen {
ToggleCommand.crystalAutoWaypoints = !ToggleCommand.crystalAutoWaypoints;
ConfigHandler.writeBooleanConfig("toggles", "CrystalAutoWaypoints", ToggleCommand.crystalAutoWaypoints);
crystalAutoWaypoints.displayString = "Auto Waypoints: " + Utils.getColouredBoolean(ToggleCommand.crystalAutoWaypoints);
+ } else if (button == crystalAutoPlayerWaypoints) {
+ ToggleCommand.crystalAutoPlayerWaypoints = !ToggleCommand.crystalAutoPlayerWaypoints;
+ ConfigHandler.writeBooleanConfig("toggles", "CrystalAutoPlayerWaypoints", ToggleCommand.crystalAutoPlayerWaypoints);
+ crystalAutoPlayerWaypoints.displayString = "Auto Add Player Waypoints: " + Utils.getColouredBoolean(ToggleCommand.crystalAutoPlayerWaypoints);
} else {
mc.displayGuiScreen(new CrystalHollowWaypointActionGui(button.id));
}