+ scriptEntry.reportObject("realistic")
+ scriptEntry.reportObject("range")
+ scriptEntry.reportObject("toggle"));
// Get the instance of the trait that belongs to the target NPC
LookClose trait = ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen().getTrait(LookClose.class);
// Handle toggle
if (scriptEntry.hasObject("toggle"))
trait.lookClose(scriptEntry.getElement("toggle").asBoolean());
// Handle realistic
if (scriptEntry.hasObject("realistic"))
trait.setRealisticLooking(true);
else trait.setRealisticLooking(false);
// Handle range
if (scriptEntry.hasObject("range")) {
trait.setRange(scriptEntry.getElement("range").asInt());
}
}