88import java .util .logging .Level ;
99
1010import com .dumptruckman .minecraft .util .Logging ;
11+ import org .jetbrains .annotations .ApiStatus ;
1112import org .mvplugins .multiverse .core .MultiverseCoreApi ;
1213import org .mvplugins .multiverse .core .config .CoreConfig ;
1314import org .mvplugins .multiverse .core .module .MultiverseModule ;
2324import org .mvplugins .multiverse .core .command .MVCommandManager ;
2425import org .mvplugins .multiverse .external .jakarta .inject .Inject ;
2526import org .mvplugins .multiverse .external .jakarta .inject .Provider ;
26- import org .mvplugins .multiverse .portals .MultiversePortals ;
27+ import org .mvplugins .multiverse .portals .MultiversePortalsApi ;
2728import org .mvplugins .multiverse .portals .utils .PortalManager ;
2829
2930public class MultiverseNetherPortals extends MultiverseModule {
@@ -286,9 +287,8 @@ public boolean isHandledByNetherPortals(Location l) {
286287 if (multiversePortals != null ) {
287288 // Catch errors which could occur if classes aren't present or are missing methods.
288289 try {
289- MultiversePortals portals = (MultiversePortals ) multiversePortals ;
290- PortalManager portalManager = portals .getServiceLocator ().getActiveService (PortalManager .class );
291- if (portalManager != null && portalManager .isPortal (l )) {
290+ PortalManager portalManager = MultiversePortalsApi .get ().getPortalManager ();
291+ if (portalManager .isPortal (l )) {
292292 return false ;
293293 }
294294 } catch (Throwable t ) {
@@ -298,6 +298,7 @@ public boolean isHandledByNetherPortals(Location l) {
298298 return true ;
299299 }
300300
301+ @ ApiStatus .Internal
301302 public void setPortals (Plugin multiversePortals ) {
302303 this .multiversePortals = multiversePortals ;
303304 }
0 commit comments