Interface ChangeBlockEvent.Pre

All Superinterfaces:
Cancellable, ChangeBlockEvent, Event
Enclosing interface:
ChangeBlockEvent

public static interface ChangeBlockEvent.Pre extends ChangeBlockEvent, Cancellable
Called before running specific block logic at one or more ServerLocation's such as BlockTypes.WATER.
  • Method Details

    • locations

      List<ServerLocation> locations()
      Represents a list of one or more ServerLocation's where BlockState changes can occur.

      Canceling this event will prevent block logic from running and also stop BlockSnapshot's from being generated.

      Note: This event is not intended to always be fired before changing a BlockState but rather it is primarily used to prevent one or more BlockState's from being changed.

      Returns:
      The immutable list of one or more locations that can change