Interface SulfurCubeSwallowEvent

All Superinterfaces:
Cancellable, Event, MobEvent

public interface SulfurCubeSwallowEvent extends MobEvent, Cancellable
Fired when a sulfur cube is about to swallow a block: one a player gives it, or one it picks up from the ground.

Cancelling it leaves the block where it is: in the hand of the player, or on the ground. It does not fire for a plugin giving the cube a block.

Since:
0.1.0
  • Method Details

    • mob

      SulfurCube mob()
      Returns the cube about to swallow the block.
      Specified by:
      mob in interface MobEvent
      Returns:
      the cube about to swallow the block
      Since:
      0.1.0
    • item

      ItemStack item()
      Returns the block about to be swallowed., one of it
      Returns:
      the block about to be swallowed
      Since:
      0.1.0
    • giver

      @Nullable Player giver()
      Returns the player giving the block, null if the cube picks it up.
      Returns:
      the player giving the block, null if the cube picks it up
      Since:
      0.1.0
    • pickedUp

      @Nullable ItemEntity pickedUp()
      Returns the item lying on the ground the cube picks the block from, null if a player gives it.
      Returns:
      the item lying on the ground the cube picks the block from, null if a player gives it
      Since:
      0.1.0