mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-03 16:13:24 +01:00
Fix compile errror
This commit is contained in:
parent
8902579c69
commit
b31a9532f7
@ -90,9 +90,9 @@ public class HumanController extends AbstractEntityController {
|
|||||||
if (cached != null) {
|
if (cached != null) {
|
||||||
profile.getProperties().put("textures", cached);
|
profile.getProperties().put("textures", cached);
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(CitizensAPI.getPlugin(),
|
Bukkit.getScheduler().runTaskLaterAsynchronously(CitizensAPI.getPlugin(),
|
||||||
new SkinFetcher(new UUIDFetcher(skinUUID, npc), nmsWorld.getMinecraftServer().av(), npc),
|
new SkinFetcher(new UUIDFetcher(skinUUID, npc), nmsWorld.getMinecraftServer().av(), npc),
|
||||||
Math.ceil(Math.min(0, 40 * Math.random())));
|
(int) Math.ceil(Math.min(1, 40 * Math.random())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,18 +157,18 @@ public class HumanController extends AbstractEntityController {
|
|||||||
.getGameProfileRepository();
|
.getGameProfileRepository();
|
||||||
repo.findProfilesByNames(new String[] { ChatColor.stripColor(reportedUUID) }, Agent.MINECRAFT,
|
repo.findProfilesByNames(new String[] { ChatColor.stripColor(reportedUUID) }, Agent.MINECRAFT,
|
||||||
new ProfileLookupCallback() {
|
new ProfileLookupCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onProfileLookupFailed(GameProfile arg0, Exception arg1) {
|
public void onProfileLookupFailed(GameProfile arg0, Exception arg1) {
|
||||||
throw new RuntimeException(arg1);
|
throw new RuntimeException(arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onProfileLookupSucceeded(final GameProfile profile) {
|
public void onProfileLookupSucceeded(final GameProfile profile) {
|
||||||
UUID_CACHE.put(reportedUUID, profile.getId().toString());
|
UUID_CACHE.put(reportedUUID, profile.getId().toString());
|
||||||
npc.data().setPersistent(CACHED_SKIN_UUID_METADATA, profile.getId().toString());
|
npc.data().setPersistent(CACHED_SKIN_UUID_METADATA, profile.getId().toString());
|
||||||
npc.data().setPersistent(CACHED_SKIN_UUID_NAME_METADATA, profile.getName());
|
npc.data().setPersistent(CACHED_SKIN_UUID_NAME_METADATA, profile.getName());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return npc.data().get(CACHED_SKIN_UUID_METADATA, reportedUUID);
|
return npc.data().get(CACHED_SKIN_UUID_METADATA, reportedUUID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user