diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java index 39b2a3c9d..a35466d1d 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java @@ -259,9 +259,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain< PlotSquared.log(Captions.PREFIX + "(UUID) Using the offline mode UUID service"); } - final OfflinePlayerUUIDService offlinePlayerUUIDService = new OfflinePlayerUUIDService(); - impromptuPipeline.registerService(offlinePlayerUUIDService); - backgroundPipeline.registerService(offlinePlayerUUIDService); + if (Settings.UUID.SERVICE_BUKKIT) { + final OfflinePlayerUUIDService offlinePlayerUUIDService = new OfflinePlayerUUIDService(); + impromptuPipeline.registerService(offlinePlayerUUIDService); + backgroundPipeline.registerService(offlinePlayerUUIDService); + } final SQLiteUUIDService sqLiteUUIDService = new SQLiteUUIDService("user_cache.db"); @@ -274,7 +276,8 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain< } final LuckPermsUUIDService luckPermsUUIDService; - if (Bukkit.getPluginManager().getPlugin("LuckPerms") != null) { + if (Settings.UUID.SERVICE_LUCKPERMS && + Bukkit.getPluginManager().getPlugin("LuckPerms") != null) { luckPermsUUIDService = new LuckPermsUUIDService(); PlotSquared .log(Captions.PREFIX + "(UUID) Using LuckPerms as a complementary UUID service"); @@ -283,7 +286,8 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain< } final BungeePermsUUIDService bungeePermsUUIDService; - if (Bukkit.getPluginManager().getPlugin("BungeePerms") != null) { + if (Settings.UUID.SERVICE_BUNGEE_PERMS && + Bukkit.getPluginManager().getPlugin("BungeePerms") != null) { bungeePermsUUIDService = new BungeePermsUUIDService(); PlotSquared .log(Captions.PREFIX + "(UUID) Using BungeePerms as a complementary UUID service"); @@ -292,7 +296,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain< } final EssentialsUUIDService essentialsUUIDService; - if (Bukkit.getPluginManager().getPlugin("Essentials") != null) { + if (Settings.UUID.SERVICE_ESSX && Bukkit.getPluginManager().getPlugin("Essentials") != null) { essentialsUUIDService = new EssentialsUUIDService(); PlotSquared .log(Captions.PREFIX + "(UUID) Using Essentials as a complementary UUID service"); @@ -302,7 +306,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain< if (!Settings.UUID.OFFLINE) { // If running Paper we'll also try to use their profiles - if (PaperLib.isPaper()) { + if (Bukkit.getOnlineMode() && PaperLib.isPaper() && Settings.UUID.SERVICE_PAPER) { final PaperUUIDService paperUUIDService = new PaperUUIDService(); impromptuPipeline.registerService(paperUUIDService); backgroundPipeline.registerService(paperUUIDService); diff --git a/Core/src/main/java/com/plotsquared/core/configuration/Settings.java b/Core/src/main/java/com/plotsquared/core/configuration/Settings.java index f575fba43..352728b43 100644 --- a/Core/src/main/java/com/plotsquared/core/configuration/Settings.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/Settings.java @@ -260,6 +260,16 @@ public class Settings extends Config { @Comment("Whether or not automatic background caching should be enabled. It is HIGHLY recommended to keep this turned on." + " This should only be disabled if the server has a very large number of plots (>100k)") public static boolean BACKGROUND_CACHING_ENABLED = true; + @Comment("Whether the paper service is enabled") + public static boolean SERVICE_PAPER = true; + @Comment("Whether the LP service is enabled") + public static boolean SERVICE_LUCKPERMS = true; + @Comment("Whether the Bukkit service is enabled") + public static boolean SERVICE_BUKKIT = true; + @Comment("Whether the EssX service is enabled") + public static boolean SERVICE_ESSX = true; + @Comment("Whether the BungeePerms service is enabled") + public static boolean SERVICE_BUNGEE_PERMS = true; }