Package io.github.djtpj.trait.traits
Class PotionImmunity
java.lang.Object
io.github.djtpj.trait.Trait
io.github.djtpj.trait.SimpleTrait
io.github.djtpj.trait.traits.PotionImmunity
- All Implemented Interfaces:
org.bukkit.event.Listener
Makes player completely unable to be affected by potions (although potions can be whitelisted from this effect).
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.djtpj.trait.Trait
Trait.Type
-
Field Summary
FieldsFields inherited from class io.github.djtpj.trait.Trait
icon, playerTraitMap, type
-
Constructor Summary
ConstructorsConstructorDescriptionPotionImmunity
(ItemIcon icon, Trait.Type type, org.json.simple.JSONArray types, Boolean whitelist) PotionImmunity
(String name, String description, org.bukkit.ChatColor color, org.bukkit.Material material, Trait.Type type, boolean whitelist, org.bukkit.potion.PotionEffectType... types) -
Method Summary
Modifier and TypeMethodDescriptionvoid
preventEffect
(org.bukkit.event.entity.EntityPotionEffectEvent event)
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
PotionImmunity
public PotionImmunity(String name, String description, org.bukkit.ChatColor color, org.bukkit.Material material, Trait.Type type, boolean whitelist, org.bukkit.potion.PotionEffectType... types) -
PotionImmunity
public PotionImmunity(ItemIcon icon, Trait.Type type, org.json.simple.JSONArray types, Boolean whitelist)
-
-
Method Details
-
preventEffect
public void preventEffect(org.bukkit.event.entity.EntityPotionEffectEvent event)
-