public final class EventFilters extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends EntityEvent> |
entityHasMetadata(MetadataKey<?> key)
Returns a predicate which only returns true if the entity has a given metadata key
|
static <T extends Cancellable> |
ignoreCancelled()
Returns a predicate which only returns true if the event isn't cancelled
|
static <T extends PlayerLoginEvent> |
ignoreDisallowedLogin()
Returns a predicate which only returns true if the login is allowed
|
static <T extends AsyncPlayerPreLoginEvent> |
ignoreDisallowedPreLogin()
Returns a predicate which only returns true if the login is allowed
|
static <T extends Cancellable> |
ignoreNotCancelled()
Returns a predicate which only returns true if the event is cancelled
|
static <T extends PlayerMoveEvent> |
ignoreSameBlock()
Returns a predicate which only returns true if the player has moved over a block
|
static <T extends PlayerMoveEvent> |
ignoreSameBlockAndY()
Returns a predicate which only returns true if the player has moved over a block, not including movement
directly up and down.
|
static <T extends PlayerMoveEvent> |
ignoreSameChunk()
Returns a predicate which only returns true if the player has moved over a chunk border
|
static <T extends PlayerEvent> |
playerHasMetadata(MetadataKey<?> key)
Returns a predicate which only returns true if the player has a given metadata key
|
static <T extends PlayerEvent> |
playerHasPermission(String permission)
Returns a predicate which only returns true if the player has the given permission
|
@Nonnull public static <T extends Cancellable> Predicate<T> ignoreCancelled()
T - the event type@Nonnull public static <T extends Cancellable> Predicate<T> ignoreNotCancelled()
T - the event type@Nonnull public static <T extends PlayerLoginEvent> Predicate<T> ignoreDisallowedLogin()
T - the event type@Nonnull public static <T extends AsyncPlayerPreLoginEvent> Predicate<T> ignoreDisallowedPreLogin()
T - the event type@Nonnull public static <T extends PlayerMoveEvent> Predicate<T> ignoreSameBlock()
T - the event type@Nonnull public static <T extends PlayerMoveEvent> Predicate<T> ignoreSameBlockAndY()
T - the event type@Nonnull public static <T extends PlayerMoveEvent> Predicate<T> ignoreSameChunk()
T - the event type@Nonnull public static <T extends EntityEvent> Predicate<T> entityHasMetadata(MetadataKey<?> key)
T - the event typekey - the metadata key@Nonnull public static <T extends PlayerEvent> Predicate<T> playerHasMetadata(MetadataKey<?> key)
T - the event typekey - the metadata key@Nonnull public static <T extends PlayerEvent> Predicate<T> playerHasPermission(String permission)
T - the event typepermission - the permissionCopyright © 2020. All rights reserved.