Interface RuneApplicable


public interface RuneApplicable
Defines items that can be applied with runes.

Default rune-applicable items are defined in Rune.DEFAULT_APPLICABLES, including but not limited to:

  • RebarArrow
  • RebarBow
  • RebarBucket
  • RebarTool
  • RebarWeapon

Implementation Example:

public class MyCustomWeapon extends RebarItem implements RuneApplicable {
    @Override
    public boolean isApplicableToTarget(
        @NotNull PlayerDropItemEvent event,
        @NotNull ItemStack rune
    ) {
        // Only allow diamond swords to be applied with runes
        return target.getType() == Material.DIAMOND_SWORD;
    }
}
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    applicableToTarget(@NotNull org.bukkit.event.player.PlayerDropItemEvent event, @NotNull org.bukkit.inventory.ItemStack rune)
    Called when a rune is dropped on a target item.
  • Method Details

    • applicableToTarget

      boolean applicableToTarget(@NotNull @NotNull org.bukkit.event.player.PlayerDropItemEvent event, @NotNull @NotNull org.bukkit.inventory.ItemStack rune)
      Called when a rune is dropped on a target item.
      Parameters:
      event - The event
      rune - The rune
      Returns:
      true if the rune is applicable to the target item, false otherwise