At least check if the chunk is loaded before updating signs, rather than just load them. - This needs major work
This commit is contained in:
parent
f37387800e
commit
0ba732fed9
@ -92,6 +92,9 @@ public class SignsHandler {
|
||||
MemoryStorage.signs.load();
|
||||
for (String sign : MemoryStorage.signs.getFile().getKeys(false)) {
|
||||
Location loc = (Location) MemoryStorage.signs.getFile().get(sign + ".location");
|
||||
|
||||
// check if that area is actually loaded. If not move on.
|
||||
if (loc.getWorld().isChunkLoaded(loc.getBlockX() >> 4, loc.getBlockZ() >> 4)) {
|
||||
if (loc.getBlock().getState() instanceof Sign) {
|
||||
Sign signblock = (Sign) loc.getBlock().getState();
|
||||
String[] lines = signblock.getLines();
|
||||
@ -178,4 +181,5 @@ public class SignsHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user