fix isProxyOnlineMode coverage, don't lookup UUIDs in offline mode (Fixes #2011)

This commit is contained in:
Shane Freeder
2021-05-05 03:54:42 +01:00
parent eccfbfe377
commit b9ab5132c3
3 changed files with 25 additions and 5 deletions

View File

@@ -25,8 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ GameProfile profile;
+ // Only fetch an online UUID in online mode
+ if (net.minecraft.server.MinecraftServer.getServer().getOnlineMode()
+ || (org.spigotmc.SpigotConfig.bungee && com.destroystokyo.paper.PaperConfig.bungeeOnlineMode)) {
+ if (com.destroystokyo.paper.PaperConfig.isProxyOnlineMode()) {
+ profile = console.getUserCache().getProfile( name );
+ } else {
+ // Make an OfflinePlayer using an offline mode UUID since the name has no profile