Anvil GUI

  • 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.

Vexio

Active Member
Jan 26, 2017
92
10
8
23
California
Explaination:
I'm trying to open an Anvil GUI so players can search (or whatever) for a player/item. The issue is that the anvil GUI does not open to the {_p} variable.
Code:
code_language.skript:
function anvilSearch(p: player):
    send "1" to {_p}
    open virtual anvil inventory to {_p}
    send "2" to {_p}
    make a gui slot 0 of {_p} with player head named "&7&oSearch for..." to do nothing
    make a gui slot 1 of {_p} with paper named "&r" to do nothing
on anvil rename:
    if event-item's name = "&7&oSearch for...":
        if event-string = "MINECRAFT":
            cancel event
            close event-player's inventory
            broadcast "&lMINECRAFT&r IS &nCOOL"
command /anvilsearch:
    trigger:
        anvilSearch(sender)
Addons: skQuery, TuSKe

Any help will be highly appreciated!
EDIT: I have changed the `anvil` to `chest` and the GUI successfully opened to the player, and formatted the slots correctly.
 
Yeah, that's why. There is a bug in that version that doesn't let you open anvil guis (and I don't remember if I did a checker to return a null inventory when the type is anvil). The only way is using MundoSK + packets.
You can see this thread from @Snow-Pyon of how to open a anvil gui, and also, you gonna need to set the slot using packets too.
 
Yeah, that's why. There is a bug in that version that doesn't let you open anvil guis (and I don't remember if I did a checker to return a null inventory when the type is anvil). The only way is using MundoSK + packets.
You can see this thread from @Snow-Pyon of how to open a anvil gui, and also, you gonna need to set the slot using packets too.
If I were to update my server version to 1.9, would that fix this issue? Or is there another version of 1.8 Spigot I'm able to use?
 
Status
Not open for further replies.