Solved how can I get inventory name in 1.14.4

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

Status
Not open for further replies.

donghan kim

New Member
Sep 7, 2018
9
0
1
27
[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_language.skript:
on inventory click:
    if inventory name of player's current inventory contains "&8Set nickname":
        cancel event
        if name of click item contains "page":
            set {_lore::*} to lore of click item
            set {_lore} to uncolored {_lore::1}
            replace all " └ this page : (" and "/%floor(size of {nickname::%uuid of player%::*}/14)+1%)" with "" in {_lore}
            set {_lore} to "%{_lore}%" parsed as integer

Errors on Reload:

code_language.skript:
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_language.skript:
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]
 
i used like this for my skript

Code:
open virtual chest with 3 rows named "set nicname"
# set variable
set {setnicname::%player%} to true

#then

on inventory click:
    if {setnicname::%player%}  is set:
       cancel event
       clear {setnicname::%player%}
       # do something
 
i used like this for my skript

Code:
open virtual chest with 3 rows named "set nicname"
# set variable
set {setnicname::%player%} to true

#then

on inventory click:
    if {setnicname::%player%}  is set:
       cancel event
       clear {setnicname::%player%}
       # do something
this is great idea for my code.
[doublepost=1575689863,1575689792][/doublepost]
Code:
import:
    org.bukkit.event.inventory.InventoryClickEvent

on InventoryClickEvent:
    if event.getView().getTitle() contains "your title":
Requires Skript-Mirror
https://forums.skunity.com/resources/skript-mirror.254/
thanks. but i do not use Skript-mirror cuz it seems to cause a lag.
 
Status
Not open for further replies.