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.

Solved how can I get inventory name in 1.14.4

Discussion in 'Skript' started by donghan kim, Dec 3, 2019.

  1. donghan kim

    donghan kim Member

    Joined:
    Sep 7, 2018
    Messages:
    8
    Likes Received:
    0
    [template=page-headers]
    | title = get Inventory name
    | subheading = Help me please
    [/template]

    Skript Version (do not put latest): version: 2.4-beta10
    Skript Author: Bensku
    Minecraft Version: 1.14
    ---
    Full Code:
    Note: If the code is too large, feel free to use a pasting website (Pastebin or hastebin)
    Note: If a variable is being set in another script, but not shown, please explain how they are being set


    Code (Skript):
    1.  
    2. on inventory click:
    3.     if inventory name of player's current inventory contains "&8Set nickname":
    4.         cancel event
    5.         if name of click item contains "page":
    6.             set {_lore::*} to lore of click item
    7.             set {_lore} to uncolored {_lore::1}
    8.             replace all " └ this page : (" and "/%floor(size of {nickname::%uuid of player%::*}/14)+1%)" with "" in {_lore}
    9.             set {_lore} to "%{_lore}%" parsed as integer
    10.  
    Errors on Reload:

    Code (Skript):
    1. In 1.13+ you cannot get the title name of an inventory outside of an InventoryClickEvent. Only if this inventory has an InventoryHolder may it be used in this state.
    Console Errors: (if applicable)

    Code (Skript):
    1. Error here
    Other Useful Info:

    Addons using (including versions):
    skRayFall+v1.9.18, SkQuery-4.1.1, Skellett-Legacy

    Troubleshooting:

    Have you tried searching the docs? Yes
    Have you tried searching the forums? Yes
    What other methods have you tried to fix it? I have tried to downgrade my Skript version and still doesn't work.
    [template=footer][/template]
     
  2. Best Answer:
    Post #2 by Vorze, Dec 3, 2019
  3. Vorze

    Vorze Well-Known Member

    Joined:
    Jul 10, 2017
    Messages:
    51
    Likes Received:
    2
    i used like this for my skript

    Code (Text):
    1. open virtual chest with 3 rows named "set nicname"
    2. # set variable
    3. set {setnicname::%player%} to true
    4.  
    5. #then
    6.  
    7. on inventory click:
    8.     if {setnicname::%player%}  is set:
    9.        cancel event
    10.        clear {setnicname::%player%}
    11.        # do something
    12.  
     
  4. XanderWander

    XanderWander Member

    Joined:
    Jan 27, 2017
    Messages:
    71
    Likes Received:
    5
  5. donghan kim

    donghan kim Member

    Joined:
    Sep 7, 2018
    Messages:
    8
    Likes Received:
    0
    this is great idea for my code.
    --- Double Post Merged, Dec 7, 2019, Original Post Date: Dec 7, 2019 ---
    thanks. but i do not use Skript-mirror cuz it seems to cause a lag.
     
Loading...