Package net.aufdemrand.denizen.npc.traits

Examples of net.aufdemrand.denizen.npc.traits.SittingTrait


            ((Wolf)((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getEntity()).setSitting(false);
        }

        else {
            NPC npc = ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen();
            SittingTrait trait = npc.getTrait(SittingTrait.class);

            if (!npc.hasTrait(SittingTrait.class)){
                npc.addTrait(SittingTrait.class);
                dB.echoDebug(scriptEntry, "...added sitting trait");
            }

            trait.stand();
            npc.removeTrait(SittingTrait.class);
        }
    }
View Full Code Here


        else if (((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getEntityType() == EntityType.WOLF) {
            ((Wolf)((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getEntity()).setSitting(true);
        }

        else {
            SittingTrait trait = ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen().getTrait(SittingTrait.class);
            if (!((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen().hasTrait(SittingTrait.class)) {
                ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen().addTrait(SittingTrait.class);
                dB.echoDebug(scriptEntry, "...added sitting trait");
            }

            if (location != null) {
                trait.sit(location);
            } else {
                trait.sit();
            }
        }
    }
View Full Code Here

TOP

Related Classes of net.aufdemrand.denizen.npc.traits.SittingTrait

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.