CHG: tf is going on in the code, should be fixed now though(I hope)
This commit is contained in:
parent
7b0ea4c694
commit
85c0374628
1 changed files with 3 additions and 2 deletions
|
@ -31,6 +31,7 @@ public class TicketListener implements Listener {
|
||||||
|
|
||||||
private final SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");
|
private final SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");
|
||||||
|
|
||||||
|
@SuppressWarnings("ConstantConditions")
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlace(SignChangeEvent e) {
|
public void onPlace(SignChangeEvent e) {
|
||||||
if(e.getLines().length < 4)
|
if(e.getLines().length < 4)
|
||||||
|
@ -62,7 +63,7 @@ public class TicketListener implements Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
String world = player.getLocation().getWorld().getName();
|
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."));
|
player.sendMessage(Text.color("&4Can't make a TicketScanner with incorrect teleport location."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -104,7 +105,7 @@ public class TicketListener implements Listener {
|
||||||
if(isInvalidFormat("HH:mm dd-MM-yyyy", date))
|
if(isInvalidFormat("HH:mm dd-MM-yyyy", date))
|
||||||
date = date + " " + format.format(new 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) {
|
if(location == null) {
|
||||||
ThemeParkConnector.getInstance().getLogger().warning("Invalid Location");
|
ThemeParkConnector.getInstance().getLogger().warning("Invalid Location");
|
||||||
return;
|
return;
|
||||||
|
|
Reference in a new issue