3
0
Fork 1

Fetch player's UUID only in online mode

Spigot patch: 0141-Only-fetch-an-online-UUID-in-online-mode.patch
kcx-1614
Prototik 2015-05-14 22:31:09 +07:00
parent f3a73d8d68
commit 3fceb97d3a
2 changed files with 6 additions and 3 deletions

View File

@ -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 {

View File

@ -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));