Added CustomGameProfile.java
This commit is contained in:
22
src/main/java/net/nuggetmc/ai/bot/CustomGameProfile.java
Normal file
22
src/main/java/net/nuggetmc/ai/bot/CustomGameProfile.java
Normal 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]));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user