Skip to content

Commit

Permalink
minor patch
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Apr 13, 2021
1 parent cf9208d commit 6e900de
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -566,6 +566,9 @@ public boolean setSpecialDef(String def, ScriptQueue queue, ObjectTag value) {
return true;
}
PlayerTag player = value.asType(PlayerTag.class, baseData.getTagContext());
if (player == null) {
return false;
}
if (queue.getLastEntryExecuted() != null) {
((BukkitScriptEntryData) queue.getLastEntryExecuted().entryData).setPlayer(player);
}
Expand All @@ -580,6 +583,9 @@ else if (def.equals("__npc")) {
return true;
}
NPCTag npc = value.asType(NPCTag.class, baseData.getTagContext());
if (npc == null) {
return false;
}
if (queue.getLastEntryExecuted() != null) {
((BukkitScriptEntryData) queue.getLastEntryExecuted().entryData).setNPC(npc);
}
Expand Down

0 comments on commit 6e900de

Please sign in to comment.