Interface BlockHandlerInterface


public interface BlockHandlerInterface
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable PortalFlag
     
    @NotNull org.bukkit.Material
     
    @NotNull PositionType
     
    @NotNull org.bukkit.plugin.Plugin
     
    @NotNull Priority
     
    boolean
    registerBlock(org.bukkit.Location blockLocation, @Nullable org.bukkit.OfflinePlayer player, Portal portal, Metadata metaData)
    Called if a Stargate is created or a block is placed, and the result of getHandledMaterial matches with the detected location
    void
    unRegisterBlock(org.bukkit.Location blockLocation, Portal portal)
    Called if a Stargate is removed, and the add-on has registered this location
  • Method Details

    • getInterfaceType

      @NotNull @NotNull PositionType getInterfaceType()
      Returns:
      The type of interface handled
    • getHandledMaterial

      @NotNull @NotNull org.bukkit.Material getHandledMaterial()
      Returns:
      The material relevant to this handler
    • getPlugin

      @NotNull @NotNull org.bukkit.plugin.Plugin getPlugin()
      Returns:
      The plugin linked to this blockHandlerInterface
    • getPriority

      @NotNull @NotNull Priority getPriority()
      Returns:
      The priority of this handler relative to other handlers
    • getFlag

      @Nullable @Nullable PortalFlag getFlag()
      Returns:
      The flag related to this type of block interface
    • registerBlock

      boolean registerBlock(org.bukkit.Location blockLocation, @Nullable @Nullable org.bukkit.OfflinePlayer player, Portal portal, Metadata metaData)

      Called if a Stargate is created or a block is placed, and the result of getHandledMaterial matches with the detected location

      Parameters:
      blockLocation - The location of the block that is placed
      player - The player that placed the block
      portal - The affected portal
      Returns:
      Whether to claim the block
    • unRegisterBlock

      void unRegisterBlock(org.bukkit.Location blockLocation, Portal portal)
      Called if a Stargate is removed, and the add-on has registered this location
      Parameters:
      blockLocation - The location of the block that is removed
      portal - The affected portal