Class BlockMechanic


public class BlockMechanic extends MechanicComponent
Mechanic that changes blocks for a duration before returning them to what they were
  • Constructor Details

    • BlockMechanic

      public BlockMechanic()
  • Method Details

    • isPending

      public static boolean isPending(org.bukkit.Location loc)
      Checks whether the location is modified by a block mechanic
      Parameters:
      loc - location to check
      Returns:
      true if modified, false otherwise
    • getKey

      public String getKey()
      Specified by:
      getKey in class EffectComponent
    • doCleanUp

      protected void doCleanUp(org.bukkit.entity.LivingEntity caster)
      Overrides:
      doCleanUp in class EffectComponent
    • execute

      public boolean execute(org.bukkit.entity.LivingEntity caster, int level, List<org.bukkit.entity.LivingEntity> targets, boolean force)
      Description copied from class: EffectComponent
      Executes the component (to be implemented)
      Specified by:
      execute in class EffectComponent
      Parameters:
      caster - caster of the skill
      level - level of the skill
      targets - targets to execute on
      force - whether skill should be forced
      Returns:
      true if executed, false if conditions not met
    • playPreview

      public void playPreview(List<Runnable> onPreviewStop, org.bukkit.entity.Player caster, int level, Supplier<List<org.bukkit.entity.LivingEntity>> targetSupplier)
      Description copied from class: EffectComponent
      Starts the component's preview effects. Removal of any registered listeners, tasks, entities, or other temporary effects should be included in a Runnable added to the provided List.
      Overrides:
      playPreview in class EffectComponent
      Parameters:
      onPreviewStop - List of Runnables to add to
      caster - caster reference
      level - the level of the skill to preview for
      targetSupplier - targets to preview on