Giter Site home page Giter Site logo

SkullUtils - Issue about xseries HOT 4 CLOSED

Creuch avatar Creuch commented on June 11, 2024
SkullUtils - Issue

from xseries.

Comments (4)

CryptoMorin avatar CryptoMorin commented on June 11, 2024

Can I see the strings?
Also the skullTexture is overriding skullOwner, or am I missing something? They're used on the same item meta. Or maybe you're using them as an alias.

from xseries.

Creuch avatar Creuch commented on June 11, 2024

Can I see the strings?
skullOwner = _Creuch
skullTexture = eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdhY2ZmNThjMjExZTQ2ODA2ZDRhYzlhNzczMjBiZjU3MjUwZWQ4YmY3OTMzZWE0M2FjOGVmMmZkNzBkZWZkYyJ9fX0=

Also the skullTexture is overriding skullOwner, or am I missing something? They're used on the same item meta. Or maybe you're using them as an alias.
It is, if both are set. If a user wants only skullOwner, then they aren't setting userTexture, so it's null

from xseries.

CryptoMorin avatar CryptoMorin commented on June 11, 2024

It's working fine for me

fun giveSkull(sync: Boolean, value: String, prevSync: Boolean = sync) {
    if (!sync) {
        Bukkit.getScheduler().runTaskAsynchronously(plugin) { -> giveSkull(true, value, false) }
        return
    }
    val item = XMaterial.PLAYER_HEAD.parseItem()!!
    var meta = item.itemMeta as SkullMeta
    meta = SkullUtils.applySkin(meta, value)
    meta.setDisplayName("$prevSync|${Bukkit.isPrimaryThread()} $value")
    item.itemMeta = meta
    player.inventory.addItem(item)
}
giveSkull(true, "_Creuch")
giveSkull(true, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdhY2ZmNThjMjExZTQ2ODA2ZDRhYzlhNzczMjBiZjU3MjUwZWQ4YmY3OTMzZWE0M2FjOGVmMmZkNzBkZWZkYyJ9fX0=")
giveSkull(false, "_Creuch")
giveSkull(false, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdhY2ZmNThjMjExZTQ2ODA2ZDRhYzlhNzczMjBiZjU3MjUwZWQ4YmY3OTMzZWE0M2FjOGVmMmZkNzBkZWZkYyJ9fX0=")

But I must say that the result for _Creuch is not correctly displayed sync and async inside the inventory. It's displayed correctly when placed. I tested this with Essentials /skull too which means whatever it is, it's not a SkullUtils bug.

from xseries.

Creuch avatar Creuch commented on June 11, 2024

Now it is for me too, idk why :/

    public ItemStack asSkull(ItemStack[] is, String owner, boolean async) {
        if(async) Bukkit.getScheduler().runTaskAsynchronously(instance, () -> is[0] = asSkull(is, owner, false));
        SkullMeta sm = (SkullMeta) is[0].getItemMeta();
        sm = SkullUtils.applySkin(sm, owner);
        is[0].setItemMeta(sm);
        return is[0];
    }

Anyway, thanks for the help

from xseries.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.