Class Trait

java.lang.Object
io.github.djtpj.trait.Trait
All Implemented Interfaces:
org.bukkit.event.Listener
Direct Known Subclasses:
CompoundTrait, SimpleTrait

public abstract class Trait extends Object implements org.bukkit.event.Listener
A Trait is a class that simply defines behavior for an Origin
See Also:
  • Field Details

  • 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 trait
      description - a description of the trait
      color - a color to represent the trait
      material - the item material to represent the trait
      type - whether the trait is positive, negative, or neutral
      See Also:
    • Trait

      protected Trait(ItemIcon icon, Trait.Type type)
      Shorter constructor for preformed ItemIcons
      Parameters:
      icon - the icon
      type - the type of the trait
  • Method Details

    • register

      protected void register()
    • getID

      public String 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)