mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-26 19:18:53 +01:00
Document the delegate events.
Fixes WORLDGUARD-3164.
This commit is contained in:
parent
46138c9abe
commit
7ab4a283fe
@ -27,6 +27,10 @@
|
|||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
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 {
|
public abstract class DelegateEvent extends Event implements Cancellable {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
|
|
||||||
package com.sk89q.worldguard.bukkit.event;
|
package com.sk89q.worldguard.bukkit.event;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility methods for dealing with delegate events.
|
||||||
|
*/
|
||||||
public final class DelegateEvents {
|
public final class DelegateEvents {
|
||||||
|
|
||||||
private DelegateEvents() {
|
private DelegateEvents() {
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
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 {
|
abstract class AbstractBlockEvent extends DelegateEvent implements BulkEvent {
|
||||||
|
|
||||||
private final World world;
|
private final World world;
|
||||||
|
@ -30,6 +30,12 @@
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.List;
|
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 {
|
public class BreakBlockEvent extends AbstractBlockEvent {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
@ -30,6 +30,12 @@
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.List;
|
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 {
|
public class PlaceBlockEvent extends AbstractBlockEvent {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
@ -31,7 +31,10 @@
|
|||||||
import java.util.List;
|
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 {
|
public class UseBlockEvent extends AbstractBlockEvent {
|
||||||
|
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
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 {
|
abstract class AbstractEntityEvent extends DelegateEvent {
|
||||||
|
|
||||||
private final Location target;
|
private final Location target;
|
||||||
|
@ -29,6 +29,12 @@
|
|||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
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 {
|
public class DamageEntityEvent extends AbstractEntityEvent {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
@ -29,6 +29,12 @@
|
|||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
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 {
|
public class DestroyEntityEvent extends AbstractEntityEvent {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
@ -30,6 +30,12 @@
|
|||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
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 {
|
public class SpawnEntityEvent extends AbstractEntityEvent {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
@ -30,7 +30,10 @@
|
|||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
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 {
|
public class UseEntityEvent extends AbstractEntityEvent {
|
||||||
|
|
||||||
|
@ -31,7 +31,10 @@
|
|||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
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 {
|
public class UseItemEvent extends DelegateEvent {
|
||||||
|
|
||||||
|
@ -25,6 +25,13 @@
|
|||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
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 {
|
public class ProcessPlayerEvent extends Event {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
Loading…
Reference in New Issue
Block a user