Unstealable inventory slot

  • 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.
Feb 4, 2017
71
4
1
36
Could anyone tell me if its intended that the "format slot" expression cant be used with on inventory click events and why that is?
"set slot" works tho but that one doesnt have an unstealable option so i always have to cancel the event

like on below i can detect inventory click events on any of the emerald blocks (buy coins) but wont get any result if i try the grass blocks (sell coins)

This isnt much of a question for help but rather if i should report a bug or not because i can work around it by cancelling the inventory click event, i just really like the convenience of "to be unstealable"

code_language.skript:
on right click on nitwit:
    player has permission "*"
    cancel event
    send "test" to the player
    send "%name of clicked entity%" to the player
    send "%villager job of clicked entity%" to the player
    set name of clicked entity to "&eCoin Merchant"
    wait 1 tick
    close player's inventory
    open chest with 1 row named "&eCoin Exchange" to player
    wait 1 tick
    format slot 0 of player with black_stained_glass_pane named " " to be unstealable
    set slot 1 of player's current inventory to glowing emerald named "&aBuy 1 Coin for" with lore "&a100 Claim Blocks"
    set slot 2 of player's current inventory to glowing emerald_block named "&aBuy 10 Coins for" with lore "&a1000 Claim Blocks"
    set slot 3 of player's current inventory to glowing emerald_block named "&aBuy 64 Coins for" with lore "&a6400 Claim Blocks"
    format slot 4 of player with black_stained_glass_pane named " " to be unstealable
    format slot 5 of player with grass named "&6Sell 1 Coin for" with lore "&6100 Claim Blocks" to be unstealable
    format slot 6 of player with grass named "&6Sell 10 Coins for" with lore "&61000 Claim Blocks" to be unstealable
    format slot 7 of player with grass named "&6Sell 64 Coins for" with lore "&66400 Claim Blocks" to be unstealable
    format slot 8 of player with black_stained_glass_pane named " " to be unstealable
 
Status
Not open for further replies.