@@ -38,7 +38,7 @@ public class MultiverseNetherPortals extends MultiverseModule {
3838 private static final String DEFAULT_END_SUFFIX = "_the_end" ;
3939
4040 protected MultiverseCoreApi core ;
41- protected boolean multiversePortalsEnabled ;
41+ protected Plugin multiversePortals ;
4242 protected FileConfiguration MVNPConfiguration ;
4343 private Map <String , String > linkMap ;
4444 private Map <String , String > endLinkMap ;
@@ -59,7 +59,7 @@ public void onEnable() {
5959 super .onEnable ();
6060 Logging .init (this );
6161 this .core = MultiverseCoreApi .get ();
62- this .multiversePortalsEnabled = getServer ().getPluginManager ().isPluginEnabled ("Multiverse-Portals" );
62+ this .multiversePortals = getServer ().getPluginManager ().getPlugin ("Multiverse-Portals" );
6363
6464 // Test if the Core was found, if not we'll disable this plugin.
6565 if (this .core == null ) {
@@ -284,7 +284,7 @@ public void setEndPlatformDropBlocks(boolean endPlatformDropBlocks) {
284284 }
285285
286286 public boolean isHandledByNetherPortals (Location l ) {
287- if (multiversePortalsEnabled ) {
287+ if (multiversePortals != null ) {
288288 // Catch errors which could occur if classes aren't present or are missing methods.
289289 try {
290290 PortalManager portalManager = MultiversePortalsApi .get ().getPortalManager ();
@@ -299,16 +299,8 @@ public boolean isHandledByNetherPortals(Location l) {
299299 }
300300
301301 @ ApiStatus .Internal
302- public void setPortalsEnabled (boolean enabled ) {
303- this .multiversePortalsEnabled = enabled ;
304- }
305-
306- /**
307- * @deprecated Use {@link MultiversePortalsApi} instead. This method should be internal use only anyways.
308- */
309- @ Deprecated
310302 public void setPortals (Plugin multiversePortals ) {
311- // do nothing
303+ this . multiversePortals = multiversePortals ;
312304 }
313305
314306 public String getDebugInfo () {
0 commit comments