Skip to content

Commit

Permalink
Shut up null errors in entity teleports
Browse files Browse the repository at this point in the history
also patch meta
  • Loading branch information
mcmonkey4eva committed Nov 27, 2014
1 parent 7caf70d commit dee4948
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -73,7 +73,7 @@ public String getPropertyId() {
////////

// <--[language]
// @name Horse Type
// @name Horse Types
// @group Properties
// @description
// This is a quick rundown of the styling information used to create a horse,
Expand Down
Expand Up @@ -55,7 +55,8 @@ else if (arg.matches("npc") && ((BukkitScriptEntryData)scriptEntry.entryData).ha
throw new InvalidArgumentsException("Must specify a location!");

// Use player or NPC as default entity
scriptEntry.defaultObject("entities", (((BukkitScriptEntryData)scriptEntry.entryData).hasPlayer() ? Arrays.asList(((BukkitScriptEntryData)scriptEntry.entryData).getPlayer().getDenizenEntity()) : null),
if (!scriptEntry.hasObject("entities"))
scriptEntry.defaultObject("entities", (((BukkitScriptEntryData)scriptEntry.entryData).hasPlayer() ? Arrays.asList(((BukkitScriptEntryData)scriptEntry.entryData).getPlayer().getDenizenEntity()) : null),
(((BukkitScriptEntryData)scriptEntry.entryData).hasNPC() ? Arrays.asList(((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getDenizenEntity()) : null));

}
Expand Down

0 comments on commit dee4948

Please sign in to comment.