aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java
diff options
context:
space:
mode:
authorThatGravyBoat <ThatGravyBoat@users.noreply.github.com>2021-07-13 04:22:16 +0000
committerGitHub Action <actions@github.com>2021-07-13 04:22:16 +0000
commitb3b16e4c82ad1e66f5564c806563dfc23658fdef (patch)
tree676f37e897537a4820204c30b52b8bc9379c324a /src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java
parent3bd212839e1d3c497a840221a0c149451967467e (diff)
downloadSkyblockHud-Death-Defied-b3b16e4c82ad1e66f5564c806563dfc23658fdef.tar.gz
SkyblockHud-Death-Defied-b3b16e4c82ad1e66f5564c806563dfc23658fdef.tar.bz2
SkyblockHud-Death-Defied-b3b16e4c82ad1e66f5564c806563dfc23658fdef.zip
Prettified Code!
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java
index 0932ab1..d6e4fd6 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java
@@ -43,12 +43,11 @@ public class CrystalWaypoints {
public void onLocationChange(LocationChangeEvent event) {
if (!event.newLocation.getCategory().equals(LocationCategory.CRYSTALHOLLOWS)) {
waypoints.clear();
+ } else if (!waypoints.containsKey("Crystal Nucleus") && SkyblockHud.config.mining.autoWaypoint) {
+ waypoints.put("Crystal Nucleus", new BlockPos(512.5, 106.5, 512.5));
}
- else if (!waypoints.containsKey("Crystal Nucleus") && SkyblockHud.config.mining.autoWaypoint){
- waypoints.put("Crystal Nucleus", new BlockPos(512.5,106.5,512.5));
- }
- if (IMPORTANT_WAYPOINTS.contains(event.newLocation) && SkyblockHud.config.mining.autoWaypoint){
- if (!waypoints.containsKey(event.newLocation.getDisplayName())){
+ if (IMPORTANT_WAYPOINTS.contains(event.newLocation) && SkyblockHud.config.mining.autoWaypoint) {
+ if (!waypoints.containsKey(event.newLocation.getDisplayName())) {
waypoints.put(event.newLocation.getDisplayName(), Minecraft.getMinecraft().thePlayer.getPosition());
}
}
@@ -100,7 +99,7 @@ public class CrystalWaypoints {
} else {
sbhMessage(sender, "Waypoint already exists!");
}
- }catch (Exception e){
+ } catch (Exception e) {
sbhMessage(sender, "Error!");
}
}
@@ -111,7 +110,7 @@ public class CrystalWaypoints {
sbhMessage(sender, "No waypoint with that name!");
break;
}
- StringSelection clipboard = new StringSelection(name + " : ("+pos.getX()+"/"+pos.getY()+"/"+pos.getZ()+")");
+ StringSelection clipboard = new StringSelection(name + " : (" + pos.getX() + "/" + pos.getY() + "/" + pos.getZ() + ")");
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(clipboard, clipboard);
break;
}
@@ -126,7 +125,7 @@ public class CrystalWaypoints {
if (args.length == 1) {
return getListOfStringsMatchingLastWord(args, Lists.newArrayList("add", "clear", "remove", "copy", "addat"));
}
- if (args.length > 1 && args[0].equalsIgnoreCase("addat")){
+ if (args.length > 1 && args[0].equalsIgnoreCase("addat")) {
return func_175771_a(args, 1, pos);
}
return null;
@@ -135,7 +134,7 @@ public class CrystalWaypoints {
);
}
- private static void sbhMessage(ICommandSender sender, String message){
+ private static void sbhMessage(ICommandSender sender, String message) {
sender.addChatMessage(new ChatComponentText("[" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "SkyBlockHud" + EnumChatFormatting.RESET + "] : " + EnumChatFormatting.GRAY + message));
}
}