Skip to content

Commit

Permalink
GH-600 Fix skull texture parse. (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
vLuckyyy authored Dec 26, 2023
1 parent cd1ccad commit 4f2e5e9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import dev.rollczi.liteskullapi.SkullAPI;
import dev.triumphteam.gui.builder.item.ItemBuilder;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
Expand All @@ -31,9 +32,10 @@ class SkullCommand {
@Execute
@DescriptionDocs(description = "Gives you a skull of player", arguments = "<player>")
void execute(@Context Player sender, @Arg(SkullNicknameArgument.KEY) String name) {
this.skullAPI.acceptSyncSkull(name, skull -> {
ItemStack namedSkull = ItemBuilder.from(skull)
this.skullAPI.acceptSyncSkullData(name, skull -> {
ItemStack namedSkull = ItemBuilder.skull()
.name(Component.text(name))
.texture(skull.getValue())
.build();

ItemStack mainHand = sender.getInventory().getItemInMainHand();
Expand Down

0 comments on commit 4f2e5e9

Please sign in to comment.