@Nonnull
    public static <T extends PlayerEvent> Predicate<T> playerHasPermission(String permission) {
        return e -> e.getPlayer().hasPermission(permission);
    }
Returns a predicate which only returns true if the player has the given permission

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