Don't get a location from a null value, fixes #46
This commit is contained in:
parent
f56ed7068d
commit
0cb6d7ca84
@ -114,7 +114,7 @@ public class Cell {
|
|||||||
* @return The location of the chest, null if none.
|
* @return The location of the chest, null if none.
|
||||||
*/
|
*/
|
||||||
public Location getChestLocation() {
|
public Location getChestLocation() {
|
||||||
return this.chest.getLocation();
|
return this.chest == null ? null : this.chest.getLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user