NBT Issue

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

zainmz

Member
Apr 29, 2017
22
1
0
24
Skript Version (do not put latest): Skript bensku-2.5-alpha3
Skript Author: none
Minecraft Version: 1.15
Addons : Skquery 4.1.2
Skstuff 1.15 unofficial fork
Skellet-Legacy
---
Full Code:
Code:
on join:
    set {_nbt} to "{SkullOwner:{Id:""771d5dce-a046-4f34-972e-d6ed5abe0e6a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI0NDJiYmY3MTcxYjVjYWZjYTIxN2M5YmE0NGNlMjc2NDcyMjVkZjc2Y2RhOTY4OWQ2MWE5ZjFjMGE1ZjE3NiJ9fX0=""}]}}}"
    wait 1 tick
    set slot 8 of player's inventory to player head with custom nbt "%{_nbt}%" named "&c&liPhone"
on respawn:
    set {_nbt} to "{SkullOwner:{Id:""771d5dce-a046-4f34-972e-d6ed5abe0e6a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI0NDJiYmY3MTcxYjVjYWZjYTIxN2M5YmE0NGNlMjc2NDcyMjVkZjc2Y2RhOTY4OWQ2MWE5ZjFjMGE1ZjE3NiJ9fX0=""}]}}}"
    wait 1 tick
    if player's gamemode is survival:
        set slot 8 of player's inventory to player head with custom nbt "%{_nbt}%" named "&c&liPhone"
on inventory click:
    if the current hotbar slot of player is 8:
        if player's gamemode is survival:
            cancel event
on drop:
    If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":
        cancel event
on left click:
    if the current hotbar slot of player is 8:
        If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":
            cancel event
on right click:
    if the current hotbar slot of player is 8:
        If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":
            execute player command "/phone"
on build:
    if the current hotbar slot of player is 8:
        if player's gamemode is survival:
            cancel event
on offhand move:
        if the current hotbar slot of player is 8:
                cancel event

I have not touched skript for a few years and trying to revive my old skripts, one of them is the one above.

For some reason it does not allow me to use the player head anymore.

Code:
>.... [17:24:04 ERROR]: a slot can't be set to 'player head with custom nbt "%{_nbt}%" named "&c&liPhone"' because the latter is neither an item type nor an item stack (phone.sk, line 4: set slot 8 of player's inventory to player head with custom nbt "%{_nbt}%" named "&c&liPhone"')
>.... [17:24:04 ERROR]: a slot can't be set to 'player head with custom nbt "%{_nbt}%" named "&c&liPhone"' because the latter is neither an item type nor an item stack (phone.sk, line 9: set slot 8 of player's inventory to player head with custom nbt "%{_nbt}%" named "&c&liPhone"')
>.... [17:24:04 ERROR]: Can't compare an item stack with 'a player head with custom nbt "%{_nbt}%" named "&c&liPhone"' (phone.sk, line 15: If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":')
>.... [17:24:04 ERROR]: Can't compare an item stack with 'a player head with custom nbt "%{_nbt}%" named "&c&liPhone"' (phone.sk, line 19: If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":')
>.... [17:24:04 ERROR]: Can't compare an item stack with 'a player head with custom nbt "%{_nbt}%" named "&c&liPhone"' (phone.sk, line 23: If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":')
 
Skript Version (do not put latest): Skript bensku-2.5-alpha3
Skript Author: none
Minecraft Version: 1.15
Addons : Skquery 4.1.2
Skstuff 1.15 unofficial fork
Skellet-Legacy
---
Full Code:
Code:
on join:
    set {_nbt} to "{SkullOwner:{Id:""771d5dce-a046-4f34-972e-d6ed5abe0e6a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI0NDJiYmY3MTcxYjVjYWZjYTIxN2M5YmE0NGNlMjc2NDcyMjVkZjc2Y2RhOTY4OWQ2MWE5ZjFjMGE1ZjE3NiJ9fX0=""}]}}}"
    wait 1 tick
    set slot 8 of player's inventory to player head with custom nbt "%{_nbt}%" named "&c&liPhone"
on respawn:
    set {_nbt} to "{SkullOwner:{Id:""771d5dce-a046-4f34-972e-d6ed5abe0e6a"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI0NDJiYmY3MTcxYjVjYWZjYTIxN2M5YmE0NGNlMjc2NDcyMjVkZjc2Y2RhOTY4OWQ2MWE5ZjFjMGE1ZjE3NiJ9fX0=""}]}}}"
    wait 1 tick
    if player's gamemode is survival:
        set slot 8 of player's inventory to player head with custom nbt "%{_nbt}%" named "&c&liPhone"
on inventory click:
    if the current hotbar slot of player is 8:
        if player's gamemode is survival:
            cancel event
on drop:
    If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":
        cancel event
on left click:
    if the current hotbar slot of player is 8:
        If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":
            cancel event
on right click:
    if the current hotbar slot of player is 8:
        If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":
            execute player command "/phone"
on build:
    if the current hotbar slot of player is 8:
        if player's gamemode is survival:
            cancel event
on offhand move:
        if the current hotbar slot of player is 8:
                cancel event

I have not touched skript for a few years and trying to revive my old skripts, one of them is the one above.

For some reason it does not allow me to use the player head anymore.

Code:
>.... [17:24:04 ERROR]: a slot can't be set to 'player head with custom nbt "%{_nbt}%" named "&c&liPhone"' because the latter is neither an item type nor an item stack (phone.sk, line 4: set slot 8 of player's inventory to player head with custom nbt "%{_nbt}%" named "&c&liPhone"')
>.... [17:24:04 ERROR]: a slot can't be set to 'player head with custom nbt "%{_nbt}%" named "&c&liPhone"' because the latter is neither an item type nor an item stack (phone.sk, line 9: set slot 8 of player's inventory to player head with custom nbt "%{_nbt}%" named "&c&liPhone"')
>.... [17:24:04 ERROR]: Can't compare an item stack with 'a player head with custom nbt "%{_nbt}%" named "&c&liPhone"' (phone.sk, line 15: If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":')
>.... [17:24:04 ERROR]: Can't compare an item stack with 'a player head with custom nbt "%{_nbt}%" named "&c&liPhone"' (phone.sk, line 19: If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":')
>.... [17:24:04 ERROR]: Can't compare an item stack with 'a player head with custom nbt "%{_nbt}%" named "&c&liPhone"' (phone.sk, line 23: If event-item is a player head with custom nbt "%{_nbt}%" named "&c&liPhone":')
Use SkBee addon for nbt. I am pretty sure NBT stuff was removed from SkStuff in the newer versions.

https://forums.skunity.com/resources/skbee.976/
 
  • Like
Reactions: zainmz
Status
Not open for further replies.