1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Click event doesn't work for non-op players

Discussion in 'Skript' started by j03ri, Nov 30, 2019.

  1. j03ri

    j03ri Member

    Joined:
    Nov 30, 2019
    Messages:
    2
    Likes Received:
    0
    I am trying to make a gui where you can equip different particle effects. I am using a mix of minecraft commands and skript (or TuSKe). It's working ok for people with op, not for people without. How do I fix this?
    The GUI opens, but when a non-op player clicks the item, it doesn't execute the command.

    This is the script I'm using:
    Code (Text):
    1. command /particlemenu:
    2.     trigger:
    3.         open chest inventory with 6 rows named "                 Aura's" to player
    4.         set {_empty} to gray glass pane named " "
    5.         set {_unk} to red glass pane named " "
    6.         set {_flame} to melon seeds named "&5Flame"
    7.         format gui slot 10 of player with {_flame} to execute player command "trigger trig_aura_flame"
    I'm using the latest version of TuSKE,
    Skript 2.4-beta10
    Minecraft Paper 1.14.4

    Thanks in advance
     
  2. Goose

    Goose Active Member

    Joined:
    Nov 23, 2019
    Messages:
    33
    Likes Received:
    1
    Make sure the player has the permission to run the command /trigger trig_aura_flame.
    The reason why it works for players with op is because people with op naturally have every single permission in the server regardless of what group they are apart of, players without op do not. If you don't have a permission set for /trigger, just add a permission and give all of the groups in the server that permission, unless there are groups that you don't want to have access to that command.
     
  3. j03ri

    j03ri Member

    Joined:
    Nov 30, 2019
    Messages:
    2
    Likes Received:
    0
    That's the problem, the groups already have the permission. They can use the command in chat, but cannot trigger it in the GUI.
    This is the ERROR message in the console when a player clicks the item in the GUI:

    Code (Text):
    1. [14:33:42 ERROR]: Could not pass event InventoryClickEvent to Skript v2.4-beta10
    2. java.lang.NullPointerException: permission
    3.         at me.lucko.luckperms.bukkit.inject.permissible.LPPermissible.addAttachment(LPPermissible.java:263) ~[?:?]
    4.         at me.lucko.luckperms.bukkit.inject.permissible.LPPermissible.addAttachment(LPPermissible.java:72) ~[?:?]
    5.         at org.bukkit.craftbukkit.v1_14_R1.entity.CraftHumanEntity.addAttachment(CraftHumanEntity.java:254) ~[patched_1.14.4.jar:git-Paper-209]
    6.         at com.github.tukenuke.tuske.util.CommandUtils.runCommand(CommandUtils.java:37) ~[?:?]
    7.         at com.github.tukenuke.tuske.sections.gui.EffFormatGUI.lambda$execute$0(EffFormatGUI.java:132) ~[?:?]
    8.         at com.github.tukenuke.tuske.manager.gui.GUI.run(GUI.java:29) ~[?:?]
    9.         at com.github.tukenuke.tuske.manager.gui.GUIManager$1.onClick(GUIManager.java:149) ~[?:?]
    10.         at com.github.tukenuke.tuske.listeners.GUIListener.onEvent(GUIListener.java:57) ~[?:?]
    11.         at com.github.tukenuke.tuske.manager.gui.v2.SkriptGUIEvent.check(SkriptGUIEvent.java:39) ~[?:?]
    12.         at ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:150) ~[?:?]
    13.         at ch.njol.skript.SkriptEventHandler$1.execute(SkriptEventHandler.java:114) ~[?:?]
    14.         at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.14.4.jar:git-Paper-209]
    15.         at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.14.4.jar:git-Paper-209]
    16.         at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:545) ~[patched_1.14.4.jar:git-Paper-209]
    17.         at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:2310) ~[patched_1.14.4.jar:git-Paper-209]
    18.         at net.minecraft.server.v1_14_R1.PacketPlayInWindowClick.a(SourceFile:33) ~[patched_1.14.4.jar:git-Paper-209]
    19.         at net.minecraft.server.v1_14_R1.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.14.4.jar:git-Paper-209]
    20.         at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.14.4.jar:git-Paper-209]
    21.         at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) ~[patched_1.14.4.jar:git-Paper-209]
    22.         at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.14.4.jar:git-Paper-209]
    23.         at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.14.4.jar:git-Paper-209]
    24.         at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.14.4.jar:git-Paper-209]
    25.         at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:1029) ~[patched_1.14.4.jar:git-Paper-209]
    26.         at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:1022) ~[patched_1.14.4.jar:git-Paper-209]
    27.         at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.14.4.jar:git-Paper-209]
    28.         at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1006) ~[patched_1.14.4.jar:git-Paper-209]
    29.         at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:929) ~[patched_1.14.4.jar:git-Paper-209]
    30.         at java.lang.Thread.run(Unknown Source) [?:?]
     
  4. Mastriel

    Mastriel Member

    Joined:
    Dec 1, 2019
    Messages:
    5
    Likes Received:
    0
    Try to have the item run a function and have that function execute the command.
     
  5. BaddCamden

    BaddCamden Member

    Joined:
    Nov 18, 2019
    Messages:
    22
    Likes Received:
    0
    execute console command, not player command
     
Loading...