Solved GUI help.

  • 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 our Wiki for downloads and any other information about Skript!

Status
Not open for further replies.

FallingCatus

Member
Jun 29, 2017
38
0
6
32
Hey all, i seem to be having an issue, i am creating a gui for my staff to use for banning warning and mute. I have only set ban and temp ban for now, I have gave the satff the permissions needed for both the ban plugin and my skript. The issue is i can use the gui fine, i click and it opens the next menu, but when my staff open the gui for example tempban nothing happens, no new page. I do get errors in consle though,

This is the Skript:

code_language.skript:
# Name - PixelAdmin GUI
# Version - AdvancedBan 2.0
# Written By - Chris90 aka FallingCactus




command /p [<offline player>]:
    permission: PixelAdmin.use
    permission message: &f&lPixel&c&lAdmin &8> &aNice try! &7Only our staff have this permission.

    trigger:
        set {_banplayer} to arg-1
        wait 2 ticks
        if arg-1 is not set:
            send "&f&lPixel&c&lAdmin &8> &6/ban &7<player>"
        if arg-1 is set:
            open virtual chest inventory with 1 rows named "&f&lPixel&c&lAdmin &7GUI" to player
            create a gui slot 0 of player with light gray glass pane named " " to do nothing
            create a gui slot 1 of player with light green glass pane named "&a&lMute: &a%{_banplayer}%" with lore "&7Click to select" to run player command "skript:smpadmintempmute %{_banplayer}%"
            create a gui slot 2 of player with light gray glass pane named " " to do nothing
            create a gui slot 3 of player with yellow glass pane named "&e&lWarn: &a%{_banplayer}%" with lore "&7Click to select" to run player command "skript:smpadmintempwarn %{_banplayer}%"
            create a gui slot 4 of player with light gray glass pane named " " to do nothing
            create a gui slot 5 of player with orange glass pane named "&6&lTemp Ban: &a%{_banplayer}%" with lore "&7Click to select" to run player command "skript:smpadmintempban %{_banplayer}%"
            create a gui slot 6 of player with light gray glass pane named " " to do nothing
            create a gui slot 7 of player with red glass pane named "&c&lPerm Ban: &a%{_banplayer}%" with lore "&7Click to select" to run player command "skript:smpadminban %{_banplayer}%"
            create a gui slot 8 of player with light gray glass pane named " " to do nothing


command /smpadminban [<offline player>]:
    permission: PixelAdmin.ban
    permission message: &f&lPixel&c&lAdmin &8> &aNice try! &7Only our mods and admins have this permission.
    trigger:
        set {_banplayer} to arg-1
        wait 2 ticks
        if arg-1 is not set:
            send "&c&lSMP&f&lAdmin &8> &6/ban &7<player>"
        if arg-1 is set:
            open virtual chest inventory with 3 rows named "&cPerm Ban: &a%{_banplayer}%" to player
            wait 1 tick
            create a gui slot 9 of player with iron sword named "&aPvP/Kill Aura Hacks" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% PvP/Kill Aura Hacks"
            create a gui slot 10 of player with feather named "&aFly/Speed/Water Hacking" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% Fly/Speed/Water Hacking"
            create a gui slot 11 of player with diamond named "&aX-Ray" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% X-Ray"
            create a gui slot 12 of player with compass named "&aAdvertising" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% Advertising"
            create a gui slot 13 of player with creeper head named "&aStaff Impersonation/Disrespect" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% Staff Impersonation/Disrespect"
            create a gui slot 14 of player with Book and Quill named "&aSpam/Racism/Harassment/Sexism/Threats/KYS" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% Spam/Racism/Harassment/Sexism/Threats/KYS"
            create a gui slot 15 of player with tnt named "&aGriefing" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% Griefing"
            create a gui slot 16 of player with ender chest named "&aExploiting &7(Please remove items/money)" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% Exploiting"
            create a gui slot 17 of player with cobweb named "&aOther/Unspecified" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% Other/Unspecified"

command /smpadmintempban [<offline player>]:
    permission: PixelAdmin.tempban
    permission message: &c&lSMP&f&lAdmin &8> &aNice try! &7Only our staff have this permission.
    trigger:
        set {_banplayer} to arg-1
        wait 2 tick
        if arg-1 is not set:
            send "&c&lSMP&f&lAdmin &r&8> &6/tempban &7<player>"
        if arg-1 is set:
            open virtual chest inventory with 5 rows named "&eTemp Ban: &a%{_banplayer}%" to player
            wait 1 tick
            create a gui slot 9 of player with iron sword named "&aPvP/Kill Aura Hacks" with lore "&e7 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 7d PvP/Kill Aura Hacks"
            create a gui slot 10 of player with feather named "&aFly/Speed/Water Hacking" with lore "&e7 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 7d Fly/Speed/Water Hacking"
            create a gui slot 11 of player with diamond named "&aX-Ray" with lore "&e7 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 7d X-Ray"
            create a gui slot 12 of player with compass named "&aAdvertising" with lore "&e7 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 7d Advertising"
            create a gui slot 13 of player with creeper head named "&aStaff Impersonation/Disrespect" with lore "&e7 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 7d Staff Impersonation/Disrespect"
            create a gui slot 14 of player with Book and Quill named "&aSpam/Racism/Harassment/Sexism/Threats/KYS" with lore "&e7 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 7d Spam/Racism/Harassment/Sexism/Threats/KYS"
            create a gui slot 15 of player with tnt named "&aGriefing" with lore "&e7 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 7d Griefing"
            create a gui slot 16 of player with ender chest named "&aExploiting  &7(Please remove items/money)" with lore "&e7 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 7d Exploiting"
            create a gui slot 17 of player with cobweb named "&aOther/Unspecified" with lore "&e7 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 7d Other/Unspecified"
            create a gui slot 27 of player with iron sword named "&aPvP/Kill Aura Hacks" with lore "&e14 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 14d PvP/Kill Aura Hacks"
            create a gui slot 28 of player with feather named "&aFly/Speed/Water Hacking" with lore "&e14 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 14d Fly/Speed/Water Hacking"
            create a gui slot 29 of player with diamond named "&aX-Ray" with lore "&e14 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 14d X-Ray"
            create a gui slot 30 of player with compass named "&aAdvertising" with lore "&e14 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 14d Advertising"
            create a gui slot 31 of player with creeper head named "&aStaff Impersonation/Disrespect" with lore "&e14 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 14d Staff Impersonation/Disrespect"
            create a gui slot 32 of player with Book and Quill named "&aSpam/Racism/Harassment/Sexism/Threats/KYS" with lore "&e14 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 14d Spam/Racism/Harassment/Sexism/Threats/KYS"
            create a gui slot 33 of player with tnt named "&aGriefing" with lore "&e14 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 14d Griefing"
            create a gui slot 34 of player with ender chest named "&aExploiting  &7(Please remove items/money)" with lore "&e14 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 14d Exploiting"
            create a gui slot 35 of player with cobweb named "&aOther/Unspecified" with lore "&e14 Days" to close:
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute console command "/essentials:smite %{_banplayer}%"
                wait 5 ticks
                execute player command "/advancedban:tempban %{_banplayer}% 14d Other/Unspecified"

This is the Console error: (only when other non opped staff try to open next gui)

code_language.skript:
[13:29:50 INFO]: BigSpikyCactus issued server command: /p SandoGO
[13:29:50 INFO]: BigSpikyCactus [d38f650b-bc7c-46be-a415-3322507e2e12]: /p SandoGO
[13:29:52 ERROR]: Could not pass event InventoryClickEvent to Skript v2.2-dev32c
java.lang.NullPointerException: name
        at me.lucko.luckperms.bukkit.model.LPPermissible.addAttachment(LPPermissible.java:204) ~[?:?]
        at me.lucko.luckperms.bukkit.model.LPPermissible.addAttachment(LPPermissible.java:67) ~[?:?]
        at org.bukkit.craftbukkit.v1_12_R1.entity.CraftHumanEntity.addAttachment(CraftHumanEntity.java:128) ~[spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at com.github.tukenuke.tuske.util.CommandUtils.runCommand(CommandUtils.java:37) ~[?:?]
        at com.github.tukenuke.tuske.sections.gui.EffFormatGUI.lambda$execute$0(EffFormatGUI.java:132) ~[?:?]
        at com.github.tukenuke.tuske.manager.gui.GUI.run(GUI.java:29) ~[?:?]
        at com.github.tukenuke.tuske.manager.gui.GUIManager$1.onClick(GUIManager.java:149) ~[?:?]
        at com.github.tukenuke.tuske.listeners.GUIListener.onEvent(GUIListener.java:57) ~[?:?]
        at com.github.tukenuke.tuske.manager.gui.v2.SkriptGUIEvent.check(SkriptGUIEvent.java:39) ~[?:?]
        at ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:145) ~[?:?]
        at ch.njol.skript.SkriptEventHandler$1.execute(SkriptEventHandler.java:109) ~[?:?]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1889) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at net.minecraft.server.v1_12_R1.PacketPlayInWindowClick.a(SourceFile:33) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at net.minecraft.server.v1_12_R1.PacketPlayInWindowClick.a(SourceFile:10) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_112]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_112]
        at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot-1.12.2.jar:git-Spigot-549c1fa-45c8386]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]

The plugins are up to date and the staff haver permissions because they can run the command fine when typed ( /smpadmintempban <player> ) its just the gui that wont work.
 
Last edited:
replace "open virtual chest inventory" to
code_language.skript:
create a gui with virtual chest with 6 rows named "":
        # stuff...
open last gui to player
don't use "format slot". use tuske gui.
tuske wiki
"create a gui with virtual chest with 6 rows named" just gives me errors on reload saying i need to check tuske documentation and it wont open a gui at all.
 
this my example(for a concept of how TuskeGUI works)
code_language.skript:
command /command <OfflinePlayer>:
    usage: &c&lSMP&f&lAdmin &8> &6/ban &7<player>
    trigger:
        set {_banplayer} to arg-1
        create a gui with virtual chest with 3 rows named "&cPerm Ban: &a%{_banplayer}%":
            make gui slot 9 with (iron sword named "&aPvP/Kill Aura Hacks"):
                loop 3 times:
                    execute console command "/essentials:smite %{_banplayer}%"
                    wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% PvP/Kill Aura Hacks"
        open last gui to player
"command params"
 
Last edited:
this my example(for a concept of how TuskeGUI works)
code_language.skript:
command /command <OfflinePlayer>:
    usage: &c&lSMP&f&lAdmin &8> &6/ban &7<player>
    trigger:
        set {_banplayer} to arg-1 # I am fix this
        create a gui with virtual chest with 3 rows named "&cPerm Ban: &a%{_banplayer}%":
            make gui slot 9 with (iron sword named "&aPvP/Kill Aura Hacks"):
                loop 3 times:
                    execute console command "/essentials:smite %{_banplayer}%"
                    wait 5 ticks
                execute player command "/advancedban:ban %{_banplayer}% PvP/Kill Aura Hacks"
        open last gui to player
"command params"
seem to be still having the same error using this layout/format. the error on console seems to reference my permission plugin "luckperms" but even if i remove the need for perms for all gui the users can not open the next gui unless opped.
 
upload_2017-12-22_16-51-31.png

The entire point is that I'm more attentive than you.
 
so do you think it may be an issue with LuckPerms or Tuske?
[doublepost=1514029497,1513958713][/doublepost]bump: can anyone help with this?
 
I still dont seem to have a solution for the actual issue here, the gui works fine, this issue is that non opped players can not move to the next page of the gui, when the click ban nothing happens but with opped players it works fine.
[doublepost=1514033428,1514032984][/doublepost]I have contacted the dev of the permission plugin. as this seems to be where the issue is.
 
Here, you're the "idiot".. :emoji_grinning:
[doublepost=1514032648,1514032535][/doublepost]I understood you love TuSKe, but let people do what they want, if they want to use format slot or tuske, god
Format slot is literal trash, I need to make a thread about that. One of old members' duties is to make sure that people follow the good practices, which imo is just as important as having working code.
Format slot is a terrible practice. You still want to use format slot ? Ok. But don't expect any help from me.
 
Status
Not open for further replies.