Archived
0

fix: return null if reference is null

This commit is contained in:
Forwolk
2018-08-04 16:17:31 +03:00
parent 72989c60b7
commit aa001b5fe2
3 changed files with 3 additions and 3 deletions

View File

@@ -99,7 +99,7 @@ public class Location implements Serializable{
public World getWorld () {
if (world == null) {
throw new IllegalStateException("World is not initialized");
return null;
}
if (world.get() == null) {
throw new ResourceUnloadedException("You're trying to get unloaded world");