use of com.destroystokyo.paper.profile.ProfileProperty in project VoxelGamesLibv2 by VoxelGamesLib.
the class TextureListener method doStuff.
public Skin doStuff(PlayerProfile playerProfile) {
Skin skin = textureHandler.getSkin(118300).orElseThrow(() -> new RuntimeException("d"));
playerProfile.clearProperties();
playerProfile.setProperty(new ProfileProperty("textures", skin.data.texture.value, skin.data.texture.signature));
return skin;
}
use of com.destroystokyo.paper.profile.ProfileProperty in project VoxelGamesLibv2 by VoxelGamesLib.
the class TextureListener method onLogin.
@EventHandler
public void onLogin(com.destroystokyo.paper.event.profile.PreLookupProfileEvent e) {
Skin skin = doStuff(Bukkit.createProfile(e.getUUID(), e.getName()));
e.setProfileProperties(new HashSet<ProfileProperty>() {
{
add(new ProfileProperty("textures", skin.data.texture.value, skin.data.texture.signature));
}
});
}
use of com.destroystokyo.paper.profile.ProfileProperty in project VoxelGamesLibv2 by VoxelGamesLib.
the class TextureHandler method getPlayerProfile.
public PlayerProfile getPlayerProfile(Skin skin) {
PlayerProfile playerProfile = Bukkit.createProfile(skin.data.uuid, skin.name);
playerProfile.setProperty(new ProfileProperty("textures", skin.data.texture.value, skin.data.texture.signature));
return playerProfile;
}
Aggregations