Oh, that changed too...
@@ -29,11 +29,10 @@ import io.github.nucleuspowered.nucleus.api.placeholder.NucleusPlaceholderServic
import io.github.nucleuspowered.nucleus.api.text.NucleusTextTemplate;
import io.github.nucleuspowered.nucleus.api.text.NucleusTextTemplateFactory;
import org.spongepowered.api.Sponge;
+import org.spongepowered.api.registry.TypeNotFoundException;
import java.util.Optional;
-import javax.lang.model.type.UnknownTypeException;
-
/**
* Contains static methods as an alternative way from using the Sponge Service manager.
*/
@@ -325,7 +324,7 @@ public final class NucleusAPI {
private static <T> Optional<T> getService(final Class<T> clazz) {
try {
return Optional.of(Sponge.getGame().getFactoryProvider().provide(clazz));
- } catch (final UnknownTypeException exception) {
+ } catch (final TypeNotFoundException exception) {
return Optional.empty();
}
}
