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:
@@ -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;
|
||||
|
||||
+1
-1
@@ -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());
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
@@ -38,34 +38,6 @@ apply-global-groups: true
|
||||
# If users on this server should have global (non-world specific) groups applied
|
||||
apply-global-world-groups: true
|
||||
|
||||
# If UUIDs should be pulled from the server, or looked up by username based upon previous
|
||||
# connections.
|
||||
#
|
||||
# This option should be set to true in most cases. When set to false, in order to get a player's
|
||||
# UUID, LuckPerms will:
|
||||
#
|
||||
# 1. Check if a player with the given username has joined before, if they have, use the UUID they
|
||||
# used on their previous login.
|
||||
# 2. Save and return the players "current" uuid.
|
||||
#
|
||||
# For offline mode (cracked) servers, a players UUID is generated based upon their username.
|
||||
#
|
||||
# IMPORTANT:
|
||||
# If you are using BungeeCord proxy running in online mode, it is important that "online-mode=false"
|
||||
# is set in server.properties, but "bungeecord: true" is set in the spigot.yml. You also need to set
|
||||
# "ip_forward: true" in BungeeCord's config.yml.
|
||||
#
|
||||
# If for whatever reason you are not able to do this, and do not have ip-forward enabled, then you
|
||||
# may need to set "use-server-uuids" to false.
|
||||
#
|
||||
# If your proxy is running in offline mode, you should still be setting up ip-forwarding as
|
||||
# described above, but may also find that you need to set "bungee-online-mode" to false in
|
||||
# paper.yml, if you are using Paper. (https://ci.destroystokyo.com/job/PaperSpigot/)
|
||||
#
|
||||
# This option only really exists for networks who for whatever reason cannot setup proper ip
|
||||
# forwarding.
|
||||
use-server-uuids: true
|
||||
|
||||
# If the servers own UUID cache/lookup facility should be used when there is no record for a player
|
||||
# in the LuckPerms cache.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user