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.

need help on a /enderchest command

Discussion in 'Skript' started by Tizo, Nov 9, 2019.

  1. Tizo

    Tizo Member

    Joined:
    Nov 9, 2019
    Messages:
    1
    Likes Received:
    0
    hello i want to do a /ec [<player>] command where when the player just types /ec his enderchest opens and he can edit everything but when he types /ec (playername) that the enderchest of the arg-1s player opens but that he cant edit anything there and just view it (im on 1.8.8)
     
  2. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    16
    Likes Received:
    0
    Do you have Essentials installed?
    --- Double Post Merged, Nov 10, 2019, Original Post Date: Nov 10, 2019 ---
    What Permissions plugin do you have installed?
     
  3. Juvius

    Juvius Member

    Joined:
    Oct 28, 2019
    Messages:
    7
    Likes Received:
    0
    Code (Text):
    1. command /enderchest [<player>]:
    2.     aliases: ec
    3. #    permission: server.enderchest
    4. #    permission message: &cInsufficient permissions!
    5.     trigger:
    6.         if {viewmode.%player%} is true:
    7.             send "&cPlease wait your viewmode is still enabled."
    8.             stop
    9.         if arg-1 is set:
    10.             set {viewmode.%player%} to true
    11.             open arg-1's ender chest to the player
    12.             send "&aOpened &6%arg-1%&a's EnderChest."
    13.             wait 10 real seconds
    14.             send "&4Viewmode disabled."
    15.             close player's inventory
    16.             set {viewmode.%player%} to false
    17.             stop
    18.         else:
    19.             open player's ender chest to the player
    20.             send "&aOpened your EnderChest."
    21.             stop
    22.            
    23. on inventory click:
    24.     if {viewmode.%player%} is true:
    25.         send "&cYou are currently in viewmode." to player
    26.         cancel event
    27.            
    28. on join:
    29.     if {viewmode.%player%} is true:
    30.         delete {viewmode.%player%}
    Give this a try? Maybe next time include which Skript version you are using, addons, etc.
     
Loading...