output.writeString(cloakURL);
output.writeBoolean(release);
}
public void run(int PlayerId) {
AbstractClientPlayer e = SpoutClient.getInstance().getAbstractPlayerFromId(entityId);
if (e != null) {
// Check if these are the Minecraft skin/cape, if so, use defaults instead
String mcSkin = "http://s3.amazonaws.com/MinecraftSkins/" + e.username + ".png";
String mcCape = "http://s3.amazonaws.com/MinecraftCloaks/" + e.username + ".png";
if (!"none".equals(this.skinURL)) {
//System.out.println(e.username + " is going to be sent skinURL: " + skinURL + " from SpoutPlugin's API.");
}
if (this.skinURL.equalsIgnoreCase(mcSkin)) {
this.skinURL = "http://skins.minecraft.net/MinecraftSkins/" + e.username + ".png";
}
if (this.cloakURL.equalsIgnoreCase(mcCape)) {
if (e.vip != null && e.vip.getCape() != null) {
this.cloakURL = e.vip.getCape();
} else {
this.cloakURL = "http://skins.minecraft.net/MinecraftCloaks/" + e.username + ".png";
}
}
if (!"none".equals(this.skinURL)) {
e.customSkinUrl = this.skinURL;
e.forceUpdate = true;
}
if (!"none".equals(this.cloakURL)) {
e.customCapeUrl = this.cloakURL;
}
e.setupCustomSkin();
}
}