Posted February 5, 2019 (edited) Is there a way to get around this? SEVERE org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour: null java.lang.NullPointerException at org.karth.wurmunlimited.mods.spookycreatures.KarthUtils.getVillageNum(KarthUtils.java:74) at org.karth.wurmunlimited.mods.spookycreatures.actions.GenericActions.action(GenericActions.java:69) at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerBehaviour.action(ActionPerformerBehaviour.java:82) at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.lambda$action$9(WrappedBehaviour.java:102) at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:211) at org.gotti.wurmunlimited.modsupport.actions.WrappedBehaviour.action(WrappedBehaviour.java:102) at org.gotti.wurmunlimited.modsupport.actions.ActionPerformerChain.action(ActionPerformerChain.java:77) *snip* Basically I'm trying to call "getVillage().getDeedId()" but whenever I'm not on a tile that's part of a deed it tries to spit out a null value which causes the above. I've tried quite a bit and I can't figure out how to get around that. Anyone better at this than me have any insight? Edited February 5, 2019 by Karthannar Share this post Link to post Share on other sites
Posted February 5, 2019 if (vt.getVillage()!=null) { // do whatever you need with the village } else { // handle case when not on village } 1 Share this post Link to post Share on other sites
Posted February 5, 2019 *smacks forehead* Of course it was that simple, thank you @bdew! Share this post Link to post Share on other sites