Package net.citizensnpcs.trait.versioned
Class PotionEffectsTrait
java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.trait.versioned.PotionEffectsTrait
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEffect
(PotionEffect effect) void
addPersistentEffect
(String name, PotionEffect effect) void
onSpawn()
Called when anNPC
is spawned.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) void
removePersistentEffect
(String name) void
run()
Called every tick if overridden.
-
Constructor Details
-
PotionEffectsTrait
public PotionEffectsTrait()
-
-
Method Details
-
addEffect
-
addPersistentEffect
-
getPersistentEffects
-
onSpawn
public void onSpawn()Description copied from class:Trait
Called when anNPC
is spawned.NPC.getEntity()
will return null until this is called. This is also called onAttach when the NPC is already spawned. -
removePersistentEffect
-
run
public void run()Description copied from class:Trait
Called every tick if overridden. -
potioneffect
public 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
-