Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraftforge.event
Class Event

    java.lang.Object
      net.minecraftforge.event.Event

Direct Known Subclasses:
  BiomeEvent, ChunkProviderEvent, ChunkWatchEvent, ClientChatReceivedEvent, CommandEvent, DecorateBiomeEvent, DrawBlockHighlightEvent, EntityEvent, ForgeChunkManager.ForceChunkEvent, ForgeChunkManager.UnforceChunkEvent, InitMapGenEvent, LiquidDictionary.LiquidRegisterEvent, LiquidEvent, OreDictionary.OreRegisterEvent, OreGenEvent, RenderWorldLastEvent, ServerChatEvent, SoundEvent, TextureLoadEvent, WorldEvent, WorldTypeEvent

    public class Event

extends Object

Base Event class that all other events are derived from

Nested Class Summary
`static interface` | `Event.HasResult`
`static class` | `Event.Result`

Constructor Summary
`Event()`

Method Summary
`ListenerList` | `getListenerList()` Returns a ListenerList object that contains all listeners that are registered to this event.
`Event.Result` | `getResult()` Returns the value set as the result of this event
`boolean` | `hasResult()` Determines if this event expects a significant result value.
`boolean` | `isCancelable()` Determine if this function is cancelable at all.
`boolean` | `isCanceled()` Determine if this event is canceled and should stop executing.
`void` | `setCanceled(boolean cancel)` Sets the state of this event, not all events are cancelable, and any attempt to cancel a event that can't be will result in a IllegalArgumentException.
`void` | `setResult(Event.Result value)` Sets the result value for this event, not all events can have a result set, and any attempt to set a result for a event that isn't expecting it will result in a IllegalArgumentException.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Event

    public Event()

Method Detail

### isCancelable

    public boolean isCancelable()

  Determine if this function is cancelable at all.

  Returns:
    If access to setCanceled should be allowed

### isCanceled

    public boolean isCanceled()

  Determine if this event is canceled and should stop executing.

  Returns:
    The current canceled state

### setCanceled

    public void setCanceled(boolean cancel)

  Sets the state of this event, not all events are cancelable, and any attempt to cancel a event that can't be will result in a IllegalArgumentException. The functionality of setting the canceled state is defined on a per-event bases.

  Parameters:
    `cancel` - The new canceled value

### hasResult

    public boolean hasResult()

  Determines if this event expects a significant result value.

### getResult

    public Event.Result getResult()

  Returns the value set as the result of this event

### setResult

    public void setResult(Event.Result value)

  Sets the result value for this event, not all events can have a result set, and any attempt to set a result for a event that isn't expecting it will result in a IllegalArgumentException. The functionality of setting the result is defined on a per-event bases.

  Parameters:
    `value` - The new result

### getListenerList

    public ListenerList getListenerList()

  Returns a ListenerList object that contains all listeners that are registered to this event.

  Returns:
    Listener List

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD