public class Event
extends java.lang.Object
IEventHandler.
Generally speaking, an event class' variables should all be public and either final or non-final, based on if they should be modifiable or not.
As an example of this behavior, the BreakEvent has a final AbstractPlayerEntity parameter, as the player that is breaking a tile should
not be changed. However, the positions and whether or not the breaking
operation was effective are non-final, meaning an event listener is able to
change which position a tile is being broken at and whether or not it should
drop its item.
Keep in mind that, when creating a custom event, you should always query any non-final variables that you pass into the event after firing it to ensure that the outcome of the event actually influences the outcome of your operation.
| Constructor and Description |
|---|
Event() |