Archived
0

отсутствие чанка не должно генерировать exception's

This commit is contained in:
2018-10-28 21:15:41 +03:00
parent 864f6e71ef
commit c6431dbe43
2 changed files with 3 additions and 0 deletions

View File

@@ -25,9 +25,11 @@ public class CoreEventListener {
Chunk chunk;
chunk = event.getPlayer().getWorld().getChunk(event.getOldLocation()); // Old chunk
if (chunk == null) return;
int ccX = chunk.getX();
int ccZ = chunk.getZ();
chunk = event.getPlayer().getWorld().getChunk(event.getNewLocation()); // Next chunk
if (chunk == null) return;
int ncX = chunk.getX();
int ncZ = chunk.getZ();