make sure worlds arent null
This commit is contained in:
parent
d02d0cb5e9
commit
7495493c27
1 changed files with 2 additions and 0 deletions
|
@ -232,11 +232,13 @@ public class NpcImpl extends Viewable implements Npc {
|
|||
}
|
||||
|
||||
public void setWorld(World world) {
|
||||
if (world == null) throw new IllegalArgumentException("world can not be null");
|
||||
delete();
|
||||
this.worldName = world.getName();
|
||||
}
|
||||
|
||||
public void setWorld(String name) {
|
||||
if (name == null) throw new IllegalArgumentException("world name can not be null");
|
||||
delete();
|
||||
this.worldName = name;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue