Update from upstream SpigotMC

Set the minimum max health attribute value to 0.1 SpigotMC/Spigot@d3b9fa0d1f
Add an option for a global cache for any request on Mojang's api SpigotMC/Spigot@3452c620df
Handle cases where the api fails to return a profile SpigotMC/Spigot@6a6eff3319
This commit is contained in:
Zach Brown
2014-07-29 14:59:47 -05:00
parent 44b38f4968
commit 651c32a5f7
3 changed files with 317 additions and 8 deletions

View File

@@ -121,19 +121,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ GameProfileLookup gameProfileLookup = new GameProfileLookup(profiles);
+
+ MinecraftServer.getServer().getGameProfileRepository().findProfilesByNames(new String[] { key }, Agent.MINECRAFT, gameProfileLookup);
+ if (!MinecraftServer.getServer().getOnlineMode() && profiles[0] == null) {
+
+ GameProfile profile = profiles[ 0 ];
+ if (profile == null) {
+ UUID uuid = EntityHuman.a(new GameProfile(null, key));
+ GameProfile profile = new GameProfile(uuid, key);
+ profile = new GameProfile(uuid, key);
+
+ gameProfileLookup.onProfileLookupSucceeded(profile);
+ }
+ } else
+ {
+
+ GameProfile profile = profiles[0];
+ Property property = Iterables.getFirst( profile.getProperties().get( "textures" ), null );
+
+ Property property = Iterables.getFirst(profile.getProperties().get("textures"), null);
+
+ if (property == null) {
+ profile = MinecraftServer.getServer().av().fillProfileProperties(profile, true);
+ if ( property == null )
+ {
+ profile = MinecraftServer.getServer().av().fillProfileProperties( profile, true );
+ }
+ }
+
+