@Nonnull
    public static <T> Optional<T> get(@Nonnull Class<T> clazz) {
        Objects.requireNonNull(clazz, "clazz");
        RegisteredServiceProvider<T> registration = Bukkit.getServicesManager().getRegistration(clazz);
        if (registration == null) {
            return Optional.empty();
        }
        return Optional.ofNullable(registration.getProvider());
    }
Loads a service instance

@param clazz the service class
@param <T> the service class type
@return the service instance, as an optional
helper/src/main/java/me/lucko/helper/Services.java