Examples of FishingTrait


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

        Element katch = scriptEntry.getElement("catch");
        Element stop = scriptEntry.getElement("stop");
        Element percent = scriptEntry.getElement("percent");

        dNPC npc = ((BukkitScriptEntryData)scriptEntry.entryData).getNPC();
        FishingTrait trait = npc.getFishingTrait();

        dB.report(scriptEntry, getName(), location.debug() + katch.debug() + percent.debug() + stop.debug());

        if (stop.asBoolean()) {
            trait.stopFishing();
            return;
        }

        npc.getEquipmentTrait().set(0, new ItemStack(Material.FISHING_ROD));

        trait.setCatchPercent(percent.asInt());
        trait.setCatchType(FishingTrait.CatchType.valueOf(katch.asString().toUpperCase()));
        trait.startFishing(location);

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.