mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-02 13:44:43 +02:00
Optimized UUID caching
This commit is contained in:
@ -445,13 +445,6 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
||||
@Override
|
||||
public UUIDWrapper initUUIDHandler() {
|
||||
final boolean checkVersion = checkVersion(1, 7, 6);
|
||||
if (!checkVersion) {
|
||||
log(C.PREFIX.s() + " &c[WARN] Titles are disabled - please update your version of Bukkit to support this feature.");
|
||||
Settings.TITLES = false;
|
||||
FlagManager.removeFlag(FlagManager.getFlag("titles"));
|
||||
} else {
|
||||
AbstractTitle.TITLE_CLASS = new DefaultTitle();
|
||||
}
|
||||
if (Settings.OFFLINE_MODE) {
|
||||
if (Settings.UUID_LOWERCASE) {
|
||||
UUIDHandler.uuidWrapper = new LowerOfflineUUIDWrapper();
|
||||
@ -472,6 +465,20 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
||||
}
|
||||
Settings.OFFLINE_MODE = true;
|
||||
}
|
||||
if (!checkVersion) {
|
||||
log(C.PREFIX.s() + " &c[WARN] Titles are disabled - please update your version of Bukkit to support this feature.");
|
||||
Settings.TITLES = false;
|
||||
FlagManager.removeFlag(FlagManager.getFlag("titles"));
|
||||
} else {
|
||||
AbstractTitle.TITLE_CLASS = new DefaultTitle();
|
||||
|
||||
if (UUIDHandler.uuidWrapper instanceof DefaultUUIDWrapper) {
|
||||
Settings.TWIN_MODE_UUID = true;
|
||||
}
|
||||
else if (UUIDHandler.uuidWrapper instanceof OfflineUUIDWrapper && !Bukkit.getOnlineMode()) {
|
||||
Settings.TWIN_MODE_UUID = true;
|
||||
}
|
||||
}
|
||||
if (Settings.OFFLINE_MODE) {
|
||||
log(C.PREFIX.s() + " &6PlotSquared is using Offline Mode UUIDs either because of user preference, or because you are using an old version of Bukkit");
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user