Hi! I'm getting this nullpointer, and I have NO idea where it comes from. Code: EntityType villager = EntityType.VILLAGER; LivingEntity vi = (LivingEntity) Bukkit.getWorld("world").spawnEntity(loc, villager); The nullpointer is pointing to that second line, I tried replacing the getworld with the multiverse core API one, that didn't change anything.. Thank you.
First, you could have the entitytype inline - that is, spawnEntity(loc, EntityType.VILLAGER). That isn't the problem though. Could it be loc is null?
You sure that 'world' exists? Try using loc.getWorld() instead (more useful in the future too) loc could be null too, make sure its initialized EDIT: Semi ninja'd by Pawnguy7
The world was a very specific one, just changed it so people would see what I meant it wouldn't be used for any others, but I went ahead and changed it anyways. So I did as told, and still got it. I've just split the line into 5 parts to see where it's coming from. seems to come from something different which I didn't include here. Thank you though!