Package net.citizensnpcs.trait

Examples of net.citizensnpcs.trait.LookClose


                + 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());
        }

    }
View Full Code Here

TOP

Related Classes of net.citizensnpcs.trait.LookClose

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.