
xyz.jpenilla.squaremap.api.ProviderHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of squaremap-api Show documentation
Show all versions of squaremap-api Show documentation
API for extending squaremap, a minimalistic and lightweight world map viewer for Minecraft servers
package xyz.jpenilla.squaremap.api;
import net.kyori.adventure.util.Services;
final class ProviderHolder {
static final HtmlComponentSerializer.Provider HTML_SERIALIZER = service(HtmlComponentSerializer.Provider.class);
static final HtmlStripper.Provider HTML_STRIPPER = service(HtmlStripper.Provider.class);
private static T service(final Class clazz) {
return Services.service(clazz)
.orElseThrow(() -> new IllegalStateException("Could not find " + clazz.getName() + " implementation"));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy