Package net.citizensnpcs.trait.versioned
Class PotionEffectsTrait
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.versioned.PotionEffectsTrait
- 
Field Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddEffect(PotionEffect effect) voidaddPersistentEffect(String name, PotionEffect effect) voidonSpawn()Called when anNPCis spawned.static voidpotioneffect(CommandContext args, CommandSender sender, NPC npc, String operation, Integer duration, String name, Integer amplifier, PotionEffectType type, Boolean icon, Boolean ambient, Boolean particles) voidremovePersistentEffect(String name) voidrun()Called every tick if overridden.
- 
Constructor Details- 
PotionEffectsTraitpublic PotionEffectsTrait()
 
- 
- 
Method Details- 
addEffect
- 
addPersistentEffect
- 
getPersistentEffects
- 
onSpawnpublic void onSpawn()Description copied from class:TraitCalled when anNPCis spawned.NPC.getEntity()will return null until this is called. This is also called onAttach when the NPC is already spawned.
- 
removePersistentEffect
- 
runpublic void run()Description copied from class:TraitCalled every tick if overridden.
- 
potioneffectpublic static void potioneffect(CommandContext args, CommandSender sender, NPC npc, String operation, Integer duration, String name, Integer amplifier, PotionEffectType type, Boolean icon, Boolean ambient, Boolean particles) throws CommandException - Throws:
- CommandException
 
 
-