Remove the 'use-server-uuids' option and internal UuidCache system

The feature has stuck around since the early days - and solves a problem which really should never occur.
This commit is contained in:
Luck committed 2018-01-21 20:18:13 +00:00
1 parent 4c3e28ba85
commit 72d4e5cf7a
28 files changed
+52 -304

No files matched your search

@@ -74,7 +74,6 @@ import me.lucko.luckperms.common.tasks.CacheHousekeepingTask;
import me.lucko.luckperms.common.tasks.ExpireTemporaryTask;
import me.lucko.luckperms.common.tasks.UpdateTask;
import me.lucko.luckperms.common.treeview.PermissionVault;
import me.lucko.luckperms.common.utils.UuidCache;
import me.lucko.luckperms.common.verbose.VerboseHandler;
import net.md_5.bungee.api.connection.ProxiedPlayer;
@@ -106,7 +105,6 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
private Storage storage;
private FileWatcher fileWatcher = null;
private InternalMessagingService messagingService = null;
private UuidCache uuidCache;
private LuckPermsApiProvider apiProvider;
private EventFactory eventFactory;
private Logger log;
@@ -183,7 +181,6 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
// load internal managers
getLog().info("Loading internal permission managers...");
this.uuidCache = new UuidCache(this);
this.userManager = new StandardUserManager(this);
this.groupManager = new StandardGroupManager(this);
this.trackManager = new StandardTrackManager(this);
@@ -322,7 +319,7 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
@Override
public ProxiedPlayer getPlayer(User user) {
return getProxy().getPlayer(this.uuidCache.getExternalUUID(user.getUuid()));
return getProxy().getPlayer(user.getUuid());
}
@Override
@@ -421,11 +418,6 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
return this.storage;
}
@Override
public UuidCache getUuidCache() {
return this.uuidCache;
}
@Override
public LuckPermsApiProvider getApiProvider() {
return this.apiProvider;
@@ -105,7 +105,7 @@ public class BungeeConnectionListener extends AbstractLoginListener implements L
@EventHandler
public void onPlayerPostLogin(PostLoginEvent e) {
final ProxiedPlayer player = e.getPlayer();
final User user = this.plugin.getUserManager().getIfLoaded(this.plugin.getUuidCache().getUUID(e.getPlayer().getUniqueId()));
final User user = this.plugin.getUserManager().getIfLoaded(e.getPlayer().getUniqueId());
if (this.plugin.getConfiguration().get(ConfigKeys.DEBUG_LOGINS)) {
this.plugin.getLog().info("Processing post-login for " + player.getUniqueId() + " - " + player.getName());
@@ -54,7 +54,7 @@ public class BungeePermissionCheckListener implements Listener {
ProxiedPlayer player = ((ProxiedPlayer) e.getSender());
User user = this.plugin.getUserManager().getIfLoaded(this.plugin.getUuidCache().getUUID(player.getUniqueId()));
User user = this.plugin.getUserManager().getIfLoaded(player.getUniqueId());
if (user == null) {
e.setHasPermission(false);
return;
@@ -77,7 +77,7 @@ public class BungeePermissionCheckListener implements Listener {
ProxiedPlayer player = ((ProxiedPlayer) e.getSender());
User user = this.plugin.getUserManager().getIfLoaded(this.plugin.getUuidCache().getUUID(player.getUniqueId()));
User user = this.plugin.getUserManager().getIfLoaded(player.getUniqueId());
if (user == null) {
e.setResult(Tristate.UNDEFINED);
return;