Class TriggerCondition

java.lang.Object
net.playavalon.mythicdungeons.api.parents.DungeonElement
net.playavalon.mythicdungeons.api.parents.TriggerCondition
All Implemented Interfaces:
Cloneable, org.bukkit.configuration.serialization.ConfigurationSerializable, org.bukkit.event.Listener
Direct Known Subclasses:
ConditionMobWithin, ConditionMythic, ConditionPartySize, ConditionPlayersWithin, ConditionTimeElapsed

public abstract class TriggerCondition extends DungeonElement implements org.bukkit.event.Listener, Cloneable, org.bukkit.configuration.serialization.ConfigurationSerializable
  • Constructor Details

    • TriggerCondition

      public TriggerCondition(String namespace, Map<String,Object> config)
    • TriggerCondition

      public TriggerCondition(String namespace)
  • Method Details

    • init

      public final void init()
      Specified by:
      init in class DungeonElement
    • check

      public abstract boolean check(TriggerFireEvent event)
      CODE RELATING TO EXECUTION
    • onEnable

      public void onEnable()
      Override me if you have additional code to run when this function is ENABLED.
    • onDisable

      public void onDisable()
      Override me if you have additional code to run when this function is DISABLED.
    • enable

      public final void enable(DungeonTrigger trigger)
    • disable

      public final void disable()
      Overrides:
      disable in class DungeonElement
    • buildMenuButton

      public abstract MenuButton buildMenuButton()
      Creates and returns a button for use with the condition browser menu. MenuButton can be initialized with a Spigot Material, and provided with a display name, lore, enchant effect, and amount.
      Specified by:
      buildMenuButton in class DungeonElement
      Returns:
      The menu button that will be displayed in the menu.
      See Also:
    • buildHotbarMenu

      public abstract void buildHotbarMenu()
      Used to build a hotbar menu for this condition. Assign `menu` with a new HotbarMenu object and fill out the methods provided.
      Specified by:
      buildHotbarMenu in class DungeonElement
      See Also:
    • clone

      public TriggerCondition clone()
      Overrides:
      clone in class DungeonElement