Document the delegate events.

Fixes WORLDGUARD-3164.
This commit is contained in:
sk89q 2014-08-31 16:10:04 -07:00
parent 46138c9abe
commit 7ab4a283fe
13 changed files with 64 additions and 3 deletions

View File

@ -27,6 +27,10 @@
import static com.google.common.base.Preconditions.checkNotNull;
/**
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*/
public abstract class DelegateEvent extends Event implements Cancellable {
@Nullable

View File

@ -19,6 +19,9 @@
package com.sk89q.worldguard.bukkit.event;
/**
* Utility methods for dealing with delegate events.
*/
public final class DelegateEvents {
private DelegateEvents() {

View File

@ -36,6 +36,10 @@
import static com.google.common.base.Preconditions.checkNotNull;
/**
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*/
abstract class AbstractBlockEvent extends DelegateEvent implements BulkEvent {
private final World world;

View File

@ -30,6 +30,12 @@
import javax.annotation.Nullable;
import java.util.List;
/**
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*
* <p>Thrown when a block is broken.</p>
*/
public class BreakBlockEvent extends AbstractBlockEvent {
private static final HandlerList handlers = new HandlerList();

View File

@ -30,6 +30,12 @@
import javax.annotation.Nullable;
import java.util.List;
/**
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*
* <p>Thrown when a block is placed.</p>
*/
public class PlaceBlockEvent extends AbstractBlockEvent {
private static final HandlerList handlers = new HandlerList();

View File

@ -31,7 +31,10 @@
import java.util.List;
/**
* Fired when a block is interacted with.
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*
* <p>Thrown when a block is interacted with.</p>
*/
public class UseBlockEvent extends AbstractBlockEvent {

View File

@ -31,6 +31,10 @@
import static com.google.common.base.Preconditions.checkNotNull;
/**
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*/
abstract class AbstractEntityEvent extends DelegateEvent {
private final Location target;

View File

@ -29,6 +29,12 @@
import static com.google.common.base.Preconditions.checkNotNull;
/**
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*
* <p>Thrown when an entity is damaged.</p>
*/
public class DamageEntityEvent extends AbstractEntityEvent {
private static final HandlerList handlers = new HandlerList();

View File

@ -29,6 +29,12 @@
import static com.google.common.base.Preconditions.checkNotNull;
/**
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*
* <p>Thrown when an entity is removed.</p>
*/
public class DestroyEntityEvent extends AbstractEntityEvent {
private static final HandlerList handlers = new HandlerList();

View File

@ -30,6 +30,12 @@
import static com.google.common.base.Preconditions.checkNotNull;
/**
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*
* <p>Thrown when an entity is spawned.</p>
*/
public class SpawnEntityEvent extends AbstractEntityEvent {
private static final HandlerList handlers = new HandlerList();

View File

@ -30,7 +30,10 @@
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Fired when an entity is interacted with.
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*
* <p>Thrown when an entity is used.</p>
*/
public class UseEntityEvent extends AbstractEntityEvent {

View File

@ -31,7 +31,10 @@
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Fired when an item is interacted with.
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*
* <p>Thrown when an item is used.</p>
*/
public class UseItemEvent extends DelegateEvent {

View File

@ -25,6 +25,13 @@
import static com.google.common.base.Preconditions.checkNotNull;
/**
* This event is an internal event. We do not recommend handling or throwing
* this event or its subclasses as the interface is highly subject to change.
*
* <p>Posted when a player has to be processed, either because a world has been
* loaded, the server has started, or WorldGuard has been reloaded.</p>
*/
public class ProcessPlayerEvent extends Event {
private static final HandlerList handlers = new HandlerList();