diff --git a/src/main/java/nl/iobyte/themeparkconnector/listeners/TicketListener.java b/src/main/java/nl/iobyte/themeparkconnector/listeners/TicketListener.java index 9d9e2e6..1b5d5f9 100755 --- a/src/main/java/nl/iobyte/themeparkconnector/listeners/TicketListener.java +++ b/src/main/java/nl/iobyte/themeparkconnector/listeners/TicketListener.java @@ -31,6 +31,7 @@ public class TicketListener implements Listener { private final SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy"); + @SuppressWarnings("ConstantConditions") @EventHandler public void onPlace(SignChangeEvent e) { if(e.getLines().length < 4) @@ -62,7 +63,7 @@ public class TicketListener implements Listener { } String world = player.getLocation().getWorld().getName(); - if(LocationUtil.fromString(world + ":" + e.getLine(3)) == null) { + if(LocationUtil.fromString(world + "," + e.getLine(3)) == null) { player.sendMessage(Text.color("&4Can't make a TicketScanner with incorrect teleport location.")); return; } @@ -104,7 +105,7 @@ public class TicketListener implements Listener { if(isInvalidFormat("HH:mm dd-MM-yyyy", date)) date = date + " " + format.format(new Date()); - Location location = LocationUtil.fromString(Objects.requireNonNull(sign.getLocation().getWorld()).getName() + ":" + sign.getLine(3)); + Location location = LocationUtil.fromString(Objects.requireNonNull(sign.getLocation().getWorld()).getName() + "," + sign.getLine(3)); if(location == null) { ThemeParkConnector.getInstance().getLogger().warning("Invalid Location"); return;