Added CustomGameProfile.java

This commit is contained in:
batchprogrammer314
2021-06-29 16:43:19 -05:00
parent 70b39259fa
commit 9520274e5e
2 changed files with 28 additions and 22 deletions

View File

@@ -0,0 +1,22 @@
package net.nuggetmc.ai.bot;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.nuggetmc.ai.utils.MojangAPI;
import java.util.UUID;
public class CustomGameProfile extends GameProfile {
public CustomGameProfile(UUID uuid, String name) {
super(uuid, name);
}
public void setSkin(String skin) {
String[] vals = MojangAPI.getSkin(skin);
if (vals != null) {
getProperties().put("textures", new Property("textures", vals[0], vals[1]));
}
}
}