File tree Expand file tree Collapse file tree
src/main/java/com/alpsbte/plotsystem Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919import com .alpsbte .plotsystem .core .system .tutorial .TutorialEventListener ;
2020import com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialNPCTurnTracker ;
2121import com .alpsbte .plotsystem .core .system .tutorial .utils .TutorialUtils ;
22+ import com .alpsbte .plotsystem .utils .DependencyManager ;
2223import com .alpsbte .plotsystem .utils .DiscordUtil ;
2324import com .alpsbte .plotsystem .utils .Utils ;
2425import com .alpsbte .plotsystem .utils .io .ConfigPaths ;
@@ -129,10 +130,8 @@ public void onEnable() {
129130 }
130131
131132 // Register discord Integration
132- org .bukkit .plugin .Plugin discordPlugin = plugin .getServer ().getPluginManager ().getPlugin ("DiscordPlotSystem" );
133- if (discordPlugin != null ) {
134- DiscordUtil .init (discordPlugin );
135- }
133+ org .bukkit .plugin .Plugin discordPlugin = DependencyManager .getDiscordIntegration ();
134+ if (discordPlugin != null ) DiscordUtil .init (discordPlugin );
136135
137136 pluginEnabled = true ;
138137 getComponentLogger ().info (text ("Enabled Plot-System plugin." , DARK_GREEN ));
Original file line number Diff line number Diff line change 44import com .sk89q .worldguard .bukkit .WorldGuardPlugin ;
55import org .bukkit .Bukkit ;
66import org .jetbrains .annotations .NotNull ;
7+ import org .jetbrains .annotations .Nullable ;
78import org .mvplugins .multiverse .core .MultiverseCoreApi ;
89
910import java .util .Objects ;
@@ -26,6 +27,10 @@ public static boolean isWorldGuardExtraFlagsEnabled() {
2627 return PlotSystem .getPlugin ().getServer ().getPluginManager ().isPluginEnabled ("WorldGuardExtraFlags" );
2728 }
2829
30+ public static @ Nullable org .bukkit .plugin .Plugin getDiscordIntegration () {
31+ return PlotSystem .getPlugin ().getServer ().getPluginManager ().getPlugin ("DiscordPlotSystem" );
32+ }
33+
2934 /**
3035 * @param worldName Name of the world
3136 * @return Config path for the world
You can’t perform that action at this time.
0 commit comments