Package io.github.djtpj.trait
Class Trait
java.lang.Object
io.github.djtpj.trait.Trait
- All Implemented Interfaces:
org.bukkit.event.Listener
- Direct Known Subclasses:
CompoundTrait
,SimpleTrait
A Trait is a class that simply defines behavior for an
Origin
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Shows whether a Trait is Positive, Negative, or Neutral -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Trait
(ItemIcon icon, Trait.Type type) Shorter constructor for preformedItemIcons
protected
Trait
(String name, String description, org.bukkit.ChatColor color, org.bukkit.Material material, Trait.Type type) Standard broken out constructor for use by non-utility abilities -
Method Summary
-
Field Details
-
playerTraitMap
-
icon
-
type
-
-
Constructor Details
-
Trait
protected Trait(String name, String description, org.bukkit.ChatColor color, org.bukkit.Material material, Trait.Type type) Standard broken out constructor for use by non-utility abilities- Parameters:
name
- the name of the traitdescription
- a description of the traitcolor
- a color to represent the traitmaterial
- the item material to represent the traittype
- whether the trait is positive, negative, or neutral- See Also:
-
Material
Trait.Type
ChatColor
ItemIcon
-
Trait
Shorter constructor for preformedItemIcons
- Parameters:
icon
- the icontype
- the type of the trait
-
-
Method Details
-
register
protected void register() -
getID
-
enable
public final void enable(org.bukkit.entity.Player player) -
onEnable
protected void onEnable(org.bukkit.entity.Player player) -
disable
public final void disable(org.bukkit.entity.Player player) -
onDisable
protected void onDisable(org.bukkit.entity.Player player)
-