forked from xjboss/KCauldronX
Fetch player's UUID only in online mode
Spigot patch: 0141-Only-fetch-an-online-UUID-in-online-mode.patch
This commit is contained in:
parent
f3a73d8d68
commit
3fceb97d3a
@ -47,7 +47,7 @@ archivesBaseName = 'kcauldron'
|
||||
ext.mcVersion = "1.7.10"
|
||||
ext.cauldronVersion = "3"
|
||||
ext.forgeVersion = "1403"
|
||||
ext.revision = "58"
|
||||
ext.revision = "59"
|
||||
version = "${mcVersion}-${cauldronVersion}.${forgeVersion}.${revision}"
|
||||
|
||||
launch4j {
|
||||
|
@ -1304,8 +1304,11 @@ public final class CraftServer implements Server {
|
||||
|
||||
OfflinePlayer result = getPlayerExact(name);
|
||||
if (result == null) {
|
||||
// This is potentially blocking :(
|
||||
GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152655_a(name);
|
||||
// Spigot start
|
||||
GameProfile profile = null;
|
||||
if (MinecraftServer.getServer().isServerInOnlineMode() || org.spigotmc.SpigotConfig.bungee) {
|
||||
profile = MinecraftServer.getServer().func_152358_ax().func_152655_a(name);
|
||||
}
|
||||
if (profile == null) {
|
||||
// Make an OfflinePlayer using an offline mode UUID since the name has no profile
|
||||
result = getOfflinePlayer(new GameProfile(UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8)), name));
|
||||
|
Loading…
Reference in New Issue
Block a user