diff --git a/pom.xml b/pom.xml index c6e7269..da1894d 100644 --- a/pom.xml +++ b/pom.xml @@ -90,7 +90,7 @@ com.github.cryptomorin XSeries - 8.2.0 + 8.4.0 com.sk89q.worldguard diff --git a/src/main/java/nl/iobyte/themepark/api/database/objects/Database.java b/src/main/java/nl/iobyte/themepark/api/database/objects/Database.java index 74a4a97..9c57613 100644 --- a/src/main/java/nl/iobyte/themepark/api/database/objects/Database.java +++ b/src/main/java/nl/iobyte/themepark/api/database/objects/Database.java @@ -2,7 +2,6 @@ package nl.iobyte.themepark.api.database.objects; import nl.iobyte.themepark.scheduler.ThemeParkScheduler; import nl.iobyte.themepark.scheduler.Task; - import java.sql.*; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/nl/iobyte/themepark/api/load/objects/SignDataLoader.java b/src/main/java/nl/iobyte/themepark/api/load/objects/SignDataLoader.java index f783055..f15889a 100644 --- a/src/main/java/nl/iobyte/themepark/api/load/objects/SignDataLoader.java +++ b/src/main/java/nl/iobyte/themepark/api/load/objects/SignDataLoader.java @@ -22,25 +22,23 @@ public class SignDataLoader implements IDataLoader { ConfigurationManager manager = api.getConfigurationManager(); for(Attraction attraction : api.getAttractionService().getAttractions().values()) { - if(attraction == null) { - return; - } + if(attraction == null) + continue; - if(!manager.contains(StorageLocation.SIGN_DATA, "signs." + attraction.getID())) { - return; - } + if(!manager.contains(StorageLocation.SIGN_DATA, "signs." + attraction.getID())) + continue; List locations = manager.getStringList(StorageLocation.SIGN_DATA, "signs." + attraction.getID()); for(String string : locations) { Location location = LocationUtil.fromString(string); - if(location == null) { + if(location == null) continue; - } - - if(!(location.getBlock().getState() instanceof Sign)) { + if(location.getBlock() == null) + continue; + + if(!(location.getBlock().getState() instanceof Sign)) continue; - } api.getSignManager().addSign(new StatusSign(attraction, location)); } diff --git a/src/main/java/nl/iobyte/themepark/api/sign/objects/StatusSign.java b/src/main/java/nl/iobyte/themepark/api/sign/objects/StatusSign.java index 85d9e52..facaf71 100644 --- a/src/main/java/nl/iobyte/themepark/api/sign/objects/StatusSign.java +++ b/src/main/java/nl/iobyte/themepark/api/sign/objects/StatusSign.java @@ -27,11 +27,7 @@ public class StatusSign { public void update() { Status status = attraction.getStatus(); - boolean b = location.getChunk().isLoaded(); - if(!b) - location.getChunk().load(true); - - if(!location.getChunk().isLoaded()) + if(location.getBlock() == null) return; if(!(location.getBlock().getState() instanceof Sign)) { @@ -42,10 +38,7 @@ public class StatusSign { Sign sign = (Sign) location.getBlock().getState(); sign.setLine(1, Text.color(attraction.getName())); sign.setLine(2, Text.color(status.getColor()+status.getName())); - sign.update(); - - if(!b) - location.getChunk().unload(); + sign.update(true); } } \ No newline at end of file diff --git a/src/main/java/nl/iobyte/themepark/logger/ThemeParkLogger.java b/src/main/java/nl/iobyte/themepark/logger/ThemeParkLogger.java index 5bdeb8f..7390c8c 100644 --- a/src/main/java/nl/iobyte/themepark/logger/ThemeParkLogger.java +++ b/src/main/java/nl/iobyte/themepark/logger/ThemeParkLogger.java @@ -1,5 +1,7 @@ package nl.iobyte.themepark.logger; +import nl.iobyte.themepark.ThemePark; + public class ThemeParkLogger { /** @@ -7,7 +9,7 @@ public class ThemeParkLogger { * @param msg Message string */ public static void toConsole(String msg) { - System.out.println("[ThemePark] "+msg); + ThemePark.getInstance().getLogger().info(msg); } } diff --git a/src/main/resources/menu.yml b/src/main/resources/menu.yml index a57f51a..6fb95b5 100644 --- a/src/main/resources/menu.yml +++ b/src/main/resources/menu.yml @@ -43,4 +43,4 @@ items: data: 0 material: JUKEBOX action: COMMAND - command: /audio + command: /audio \ No newline at end of file