Skip to content

Commit

Permalink
Catch a potential error more smart-like
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 1, 2016
1 parent 3ff0ec8 commit 7b0df7e
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -177,6 +177,10 @@ else if (npc.getValue().isSpawned()) {
*/
@EventHandler
public void onSpawn(NPCSpawnEvent event) {
if (event.getNPC() == null) {
dB.echoError("Null NPC spawned!");
return;
}
_registerNPC(event.getNPC());
// Do world script event 'On NPC spawns'
OldEventManager.doEvents(Arrays.asList
Expand Down

0 comments on commit 7b0df7e

Please sign in to comment.