}
// Check to make sure required arguments have been filled
if ((!scriptEntry.hasObject("value")))
throw new InvalidArgumentsException("Must specify a value!");
// If the world has not been specified, try to use the NPC's or player's
// world, or default to "world" if necessary
if (!scriptEntry.hasObject("world")) {
scriptEntry.addObject("world",
((BukkitScriptEntryData) scriptEntry.entryData).hasNPC() ?
new dWorld(((BukkitScriptEntryData) scriptEntry.entryData).getNPC().getWorld()) :
(((BukkitScriptEntryData) scriptEntry.entryData).hasPlayer() ?
new dWorld(((BukkitScriptEntryData) scriptEntry.entryData).getPlayer().getWorld()) : null));
}
scriptEntry.defaultObject("type", new Element("GLOBAL"));
if (!scriptEntry.hasObject("world"))
throw new InvalidArgumentsException("Must specify a valid world!");
}