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

Solved I had a problem with TuSKe GUIs and Permissions

Discussion in 'Skript' started by Aidanete, Jul 23, 2018.

Thread Status:
Not open for further replies.
  1. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    A day ago, I tried to use LuckPerms for my server, and was very cool and worked fine, anyway, I had a problem that when you execute a command from a TuSKe GUI when deopped, also when you have the permission to execute that command, it will not work, also I tried to use the command in chat and, it worked well but in GUIs no.

    Any way to fix this?

    Thank you for the help

    Skript version: The last from a week ago, dev36
    TuSKe version: v1.8.2
    Minecraft version: v1.12.2
    LuckPerms version: I downloaded 3 days ago, too much further I think it will not go (v4.2.17)

     
  2. Best Answer:
    Post #14 by ShaneBee, Jul 29, 2018
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    You are going to have to show your code. Its really hard to help you out when we have no code to work with
     
  4. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    This is the code for the gui:
    Code (Skript):
    1. player is holding a book named "<yellow><bold>Game selector":
    2.         open virtual chest inventory with size 6 named "<dark blue><bold>Game Selector" to the player
    3.         set {_item} to bookshelf named "<gold><bold>Main Lobby"
    4.         set line 1 of lore of {_item} to "<gray>Click here to return to"
    5.         set line 2 of lore of {_item} to "<gray>the main lobby"
    6.         format gui slot 45 of player with {_item} to run player command "/lobby"
    7.         set {_item} to emerald named "<lime><bold>Profile"
    8.         set line 1 of lore of {_item} to "<gray>See your stats and modify"
    9.         set line 2 of lore of {_item} to "<gray>your preferences"
    10.         format gui slot 46 of player with {_item} to close
    11.         set {_item} to bow named "<lime>SkyWars"
    12.         set line 1 of lore of {_item} to "<gray>Start a full battle in the sky wether the"
    13.         set line 2 of lore of {_item} to "<gray>last man standing wins"
    14.         set line 4 of lore of {_item} to "<yellow><bold>Status: <light red>Unavaliable"
    15.         format gui slot 12 of player with {_item} to close
    16.         set {_item} to note block named "<lime>RandomPVP"
    17.         set line 1 of lore of {_item} to "<gray>A game where you have to find your "
    18.         set line 2 of lore of {_item} to "<gray>weapons and armor in crates all"
    19.         set line 3 of lore of {_item} to "<gray>around the map, then equip yourself"
    20.         set line 4 of lore of {_item} to "<gray>to kill the most enemies you can."
    21.         set line 6 of lore of {_item} to "<yellow><bold>Status: <gold>Beta"
    22.         format gui slot 13 of player with {_item} to run player command "/play randompvp"
    23.         set {_item} to boat named "<lime>The Bridge"
    24.         set line 1 of lore of {_item} to "<gray>Be the first team to score 5 goals"
    25.         set line 2 of lore of {_item} to "<gray>on the enemy's hole, but be careful"
    26.         set line 3 of lore of {_item} to "<gray>the only way to reach the enemy's zone"
    27.         set line 4 of lore of {_item} to "<gray>is by a 1 block bridge"
    28.         set line 6 of lore of {_item} to "<yellow><bold>Status: <gold>Beta"
    29.         format gui slot 14 of player with {_item} to run player command "/play tb"
    30.         set {_item} to ladder named "<lime>Parkour"
    31.         set line 1 of lore of {_item} to "<gray>A little more relaxing gamemode "
    32.         set line 2 of lore of {_item} to "<gray>after a big conquer on any other"
    33.         set line 3 of lore of {_item} to "<gray>Jump over platforms and try to not fall"
    34.         set line 4 of lore of {_item} to "<gray>Are you ready to complete all maps?"
    35.         set line 6 of lore of {_item} to "<yellow><bold>Status: <light red>Unavaliable"
    36.         format gui slot 22 of player with {_item} to close
    37.         format gui slot 36 of player with black stained glass pane named " " to close
    38.         format gui slot 37 of player with black stained glass pane named " " to close
    39.         format gui slot 38 of player with black stained glass pane named " " to close
    40.         format gui slot 39 of player with black stained glass pane named " " to close
    41.         format gui slot 40 of player with black stained glass pane named " " to close
    42.         format gui slot 41 of player with black stained glass pane named " " to close
    43.         format gui slot 42 of player with black stained glass pane named " " to close
    44.         format gui slot 43 of player with black stained glass pane named " " to close
    45.         format gui slot 44 of player with black stained glass pane named " " to close
    46.         format gui slot 0 of player with black stained glass pane named " " to close
    47.         format gui slot 1 of player with black stained glass pane named " " to close
    48.         format gui slot 2 of player with black stained glass pane named " " to close
    49.         format gui slot 3 of player with black stained glass pane named " " to close
    50.         format gui slot 4 of player with black stained glass pane named " " to close
    51.         format gui slot 5 of player with black stained glass pane named " " to close
    52.         format gui slot 6 of player with black stained glass pane named " " to close
    53.         format gui slot 7 of player with black stained glass pane named " " to close
    54.         format gui slot 8 of player with black stained glass pane named " " to close
    55.         format gui slot 9 of player with black stained glass pane named " " to close
    56.         format gui slot 17 of player with black stained glass pane named " " to close
    57.         format gui slot 18 of player with black stained glass pane named " " to close
    58.         format gui slot 26 of player with black stained glass pane named " " to close
    59.         format gui slot 27 of player with black stained glass pane named " " to close
    60.         format gui slot 35 of player with black stained glass pane named " " to close
    61.         set {_item} to chest named "<gold><bold>Cosmetics"
    62.         set line 1 of lore of {_item} to "<gray>Modify your appaerance with"
    63.         set line 2 of lore of {_item} to "<gray>some little modifiers"
    64.         format gui slot 47 of player with {_item} to close
    65.         set {_item} to barrier named "<light red><bold>Report a player"
    66.         set line 1 of lore of {_item} to "<gray>Allows you to report a player"
    67.         set line 2 of lore of {_item} to "<gray>if he is cheating or making hard the life"
    68.         set line 3 of lore of {_item} to "<gray>of the rest of players"
    69.         format gui slot 53 of player with {_item} to close
    If you need something more, tell me!
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    try change "to run player command" to "to close then run player command"
     
  6. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    Also didn't work, as I said, the problem occurs when deopped, when that command should work, and works in chat but in the guis nope.
    --- Double Post Merged, Jul 25, 2018, Original Post Date: Jul 24, 2018 ---
    *bump*
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    Okay So I was wanting to test this out. I copy/pasted your skript into a test folder and created this command so I could test the bookshelf
    Code (Skript):
    1. command /lobbyset:
    2.     trigger:
    3.         set {lobby} to location of player
    4.  
    5. command /lobby:
    6.     trigger:
    7.         teleport player to {lobby}
    I clicked the bookshelf and I was teleported to the lobby.
    I was op'd and it worked. I deop'd myself and it works.
    So im not really sure what the trouble is here
     
  8. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    Maybe that the lobby command has a permission node required, but the problem is that tthe permission node is in the default rank in the LP permission list. I did explained well?

    The default rank is supposed to have that permission, and it works deopped but when using guis no.

    EDIT: Okay, I will show more images
    Code (Skript):
    1. command /lobby:
    2.     description: Teleports player to the main lobby
    3.     usage: /lobby
    4.     permission: wm.lobby
    5.     permission message: You don't have permission to perform this command
    6.     executable by: players
    7.     trigger:
    8.         if {wm.lobbycommand} is not 0:
    9.             if {wm.golobby.%command sender%} is 0:
    10.                 message "<gold>[<yellow>WarpManager<gold>] <light red>You can't teleport to lobby now.."
    11.             else if {wm.lobby} is not set:
    12.                 message "<gold>[<yellow>WarpManager<gold>] <light red>Lobby is not set yet: <light blue>/setlobby <light red>to set the lobby"
    13.             else:
    14.                 teleport player to {wm.lobby}
    And this is the permissions for the default rank:
    Default Rank.png
    PD: Had in account that the script I used for lobbies and homes and warps is a very old one and I were very noob when I did it, so is normal that I have no list variables used

    PD2: When I execute the command /lobby without permission it shows a message but when using TuSKe GUI and click it the inventory will not do anything and no message is shown, so is a TuSKe error I think.
    --- Double Post Merged, Jul 29, 2018, Original Post Date: Jul 28, 2018 ---
    *Bump*
     
  9. jaylawl

    jaylawl Active Member

    Joined:
    Jan 29, 2017
    Messages:
    173
    Likes Received:
    31
    Code (Skript):
    1.  
    2. command /lobby:
    3.     description: Teleports player to the main lobby
    4.     usage: /lobby
    5.     #permission: wm.lobby
    6.     #permission message: You don't have permission to perform this command
    7.     executable by: players
    8.     trigger:
    9.         command sender has permission "wm.lobby"
    10.         if {wm.lobbycommand} is not 0:
    11.             if {wm.golobby.%command sender%} is 0:
    12.                 message "<gold>[<yellow>WarpManager<gold>] <light red>You can't teleport to lobby now.."
    13.             else if {wm.lobby} is not set:
    14.                 message "<gold>[<yellow>WarpManager<gold>] <light red>Lobby is not set yet: <light blue>/setlobby <light red>to set the lobby"
    15.             else:
    16.                 teleport player to {wm.lobby}
    17.  
    try and see if this makes any difference for you
     
  10. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    Still not working, probably TuSKe ignores permissions and only accept opped guys (admins)
     
  11. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    Do you have vault on your server?
     
  12. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    Eeeeh, nope
     
  13. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    And theres your problem :emoji_wink:
    Haha I racked my brain on this one a few times.
    Vault is an API that links chat/economy/permission stuff together.
    Example, skript tells vault something, which tells LuckPerms something, and back and forth.
    If you dont have fault, permissions aint going to work
     
  14. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    I installed Vault as you said and now when deopped the player can't do absolutely nothing, including opening guis, something that before worked well

    EDIT: Okay, was a bug, now fixed but with vault or without it is the same result.
     
  15. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    I just realized now you are running tuske 1.8.2, is it the pikachu patch?
    If YES, when you do /ver tuske, it should look like this
    "[11:55:38 INFO]: TuSKe version 1.8.2-Pikachu-Patch-3"
    If NO, then I suggest you download it from HERE

    I have copied and pasted your code into a test Skript, and its working just fine. I set a lobby, and it TP's me to "lobby" I dont really see what the problem is other than a potentially outdated version of tuske
     
    • Winner Winner x 1
  16. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    Okay, now it works fine when deopped and also opped. Thank you very much!
     
  17. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    227
    YAY Glad It works now :emoji_slight_smile:
    Happy to help
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...