mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Disable the paper uuid service for offline mode servers and add toggles for all third party uuid services
This commit is contained in:
parent
a2ec404014
commit
6cf2c0ad97
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user