@Nonnull
    public static <T extends PlayerEvent> Predicate<T> playerHasMetadata(MetadataKey<?> key) {
        return e -> Metadata.provideForPlayer(e.getPlayer()).has(key);
    }
Returns a predicate which only returns true if the player has a given metadata key

@param key the metadata key
@param <T> the event type
@return a predicate which only returns true if the player has a given metadata key
helper/src/main/java/me/lucko/helper/event/filter/EventFilters.java