Interface SlimefunBlockHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@Deprecated @FunctionalInterface public interface SlimefunBlockHandler
Deprecated.
Please use the BlockBreakHandler instead.
A SlimefunBlockHandler handles breaking and placing of blocks. You can use this class to initialize block data but also to correctly destroy blocks.

SlimefunItem.registerBlockHandler(String, SlimefunBlockHandler);

Author:
TheBusyBiscuit
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    onBreak(org.bukkit.entity.Player p, org.bukkit.block.Block b, SlimefunItem item, UnregisterReason reason)
    Deprecated.
    This method gets called when the Block is broken.
  • Method Details

    • onBreak

      boolean onBreak(org.bukkit.entity.Player p, org.bukkit.block.Block b, SlimefunItem item, UnregisterReason reason)
      Deprecated.
      This method gets called when the Block is broken. The Player will be null if the Block exploded
      Parameters:
      p - The Player who broke the Block
      b - The Block that was broken
      item - The SlimefunItem that was stored in that Block
      reason - The reason for the Block breaking
      Returns:
      Whether the Event should be cancelled