mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2025-02-17 21:02:12 +01:00
yaw null check
This commit is contained in:
parent
209f8064de
commit
5a0723b145
@ -52,9 +52,11 @@ public class TeleportSign extends LocationSign {
|
||||
public void onInit() {
|
||||
super.onInit();
|
||||
for (int i = 1; i <= 2; i++) {
|
||||
if (!lines[i].isEmpty()) {
|
||||
int yaw = BlockUtil.lettersToYaw(lines[i]);
|
||||
if (yaw != -1) {
|
||||
if (lines[i].isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
Integer yaw = BlockUtil.lettersToYaw(lines[i]);
|
||||
if (yaw != null) {
|
||||
location.setYaw(yaw);
|
||||
} else {
|
||||
String[] loc = lines[i].split(",");
|
||||
@ -73,7 +75,6 @@ public class TeleportSign extends LocationSign {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
getSign().getBlock().setType(VanillaItem.AIR.getMaterial());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user