Package net.md_5.bungee.api.event

# Class AsyncEvent<T>

java.lang.Object
net.md_5.bungee.api.plugin.Event
net.md_5.bungee.api.event.AsyncEvent<T>

Type Parameters:
  `T` - Type of this event

Direct Known Subclasses:
  `LoginEvent`, `PostLoginEvent`, `PreLoginEvent`, `ProxyPingEvent`

public class AsyncEvent<T> extends Event
Represents an event which depends on the result of asynchronous operations.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AsyncEvent(Callback<T> done)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `canEqual(Object other)`
  `void`
  `completeIntent(Plugin plugin)`
  Notifies this event that this plugin has completed an intent and wishes to let the event proceed once all intents have been completed.
  `boolean`
  `equals(Object o)`
  `int`
  `hashCode()`
  `void`
  `postCall()`
  Method called after this event has been dispatched to all handlers.
  `void`
  `registerIntent(Plugin plugin)`
  Register an intent that this plugin will continue to perform work on a background task, and wishes to let the event proceed once the registered background task has completed.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### AsyncEvent

    public AsyncEvent(Callback<T> done)

- ## Method Details

  - ### postCall

    public void postCall()
    Description copied from class: `Event`
    Method called after this event has been dispatched to all handlers.
    Overrides:
      `postCall` in class `Event`

  - ### registerIntent

    public void registerIntent(Plugin plugin)
    Register an intent that this plugin will continue to perform work on a background task, and wishes to let the event proceed once the registered background task has completed. Multiple intents can be registered by a plugin, but the plugin must complete the same amount of intents for the event to proceed.
    Parameters:
      `plugin` - the plugin registering this intent

  - ### completeIntent

    public void completeIntent(Plugin plugin)
    Notifies this event that this plugin has completed an intent and wishes to let the event proceed once all intents have been completed.
    Parameters:
      `plugin` - a plugin which has an intent registered for this event

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### canEqual

    protected boolean canEqual(Object other)

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`