Open Menu/Custom Item
JxdenGreen opened this issue · 13 comments
v5.0.6-RELEASE-b395
Hello, I am trying to create a naviation compass where you can teleport between worlds. When i join a game i would like the compass to be in a specific slot and when clicked for it to open a GUI and have a world selector. I am using the plugin command panels to create the GUI and was hoping there was a way to use this with ItemJoin so that i can control which worlds the compass is shown/not shown. I thought that the navigation compass created by command panels would be classed as a 'custom item' but when i put it in the custom item area it does not save.
Items YML : https://pastebin.com/A7ghSu4f
Command Panels Plugin Code/Custom Item: https://pastebin.com/HvfQry97
Could anyone please help me out, thanks.
So it is a little hard for me to follow what you are saying, maybe its because I am a little tired but I noticed your command for the items.yml is not set up properly.
Here is a fixed items.yml, let me know if this fixed your issue; https://pastebin.com/vrRkHAtP
Note: the command should be written exactly as it is intended to be executed. So in the fixed items.yml I put menu
so it will force the player to execute /menu
as if they actually typed the command. If this is not the intended command, simply replace it with the command of your choice. Do not include the /
symbol.
So it is a little hard for me to follow what you are saying, maybe its because I am a little tired but I noticed your command for the items.yml is not set up properly.
Here is a fixed items.yml, let me know if this fixed your issue; https://pastebin.com/vrRkHAtPNote: the command should be written exactly as it is intended to be executed. So in the fixed items.yml I put
menu
so it will force the player to execute/menu
as if they actually typed the command. If this is not the intended command, simply replace it with the command of your choice. Do not include the/
symbol.
Hi, thanks for the reply, it now works thank you. I was wondering if there is any way to give the compass a customized name with colour? Thanks
Sorry for the late reply. Yes you can give a custom name via name: '&eI am a cake'
using Minecraft Color Codes. Same goes for lore as well.
See; https://www.digminecraft.com/lists/color_list_pc.php
And see more info on creating items; https://github.com/RockinChaos/ItemJoin/wiki/Creating-Items
Example;
any-text:
id: DIAMOND
slot: 0
name: '&eI am a cake'
enabled-worlds: world_name_here, another_world_name
Sorry for the late reply. Yes you can give a custom name via
name: '&eI am a cake'
using Minecraft Color Codes. Same goes for lore as well.See; https://www.digminecraft.com/lists/color_list_pc.php
And see more info on creating items; https://github.com/RockinChaos/ItemJoin/wiki/Creating-Items
Example;
any-text: id: DIAMOND slot: 0 name: '&eI am a cake' enabled-worlds: world_name_here, another_world_name
Hi, thanks for that, i am currently trying to make it so that after using the compass that is in my inventory in the server hub when i join the server i can teleport to a different world for kitpvp. is there any way to make it so that when i teleport to the kitpvp world another item appears in my inventory that i am able to select kits for. i have another GUI already made /pvp
i attempted to try this myself but i did not work, i do not think i have inputted the code correctly, so when i try to do what i have done here: https://pastebin.com/RwUuhcV3 i am no longer able to open up the compass navigator OR the kit pvp selector (diamond sword). Hope this makes sense, is there anything you could do to help please? Thank you and i hope you are well!
You had incorrect spacing on your second item(s) identifier. Also remember you cannot name the items the same thing they have to be uniquely defined. They were both identified as ultra-item
so I changed one to be compass-item
and the other to be sword-item
.
Fixed items.yml; https://pastebin.com/ThVGXiXR
You had incorrect spacing on your second item(s) identifier. Also remember you cannot name the items the same thing they have to be uniquely defined. They were both identified as
ultra-item
so I changed one to becompass-item
and the other to besword-item
.Fixed items.yml; https://pastebin.com/ThVGXiXR
Hi Thanks again for getting back in touch and helping me with this. I inputted this in the config but i am unable to use either the compass or diamond sword to open their GUI menus any ideas as to why this might be?
Thanks again i really do appreciate it!!
Hmm, it is possible that it is specific to the menu plugin you are using. Do you get a message in chat that says unknown command?
Also what GUI menu plugin are you using, I could get you the proper command. Sometimes the commands specific to the menu do not work as it is registered only to that plugin rather than the whole server so in the instance of ChestCommandsGUI I have to use /cc open menu
to open the menu.yml.
There is no error message when I click on the item, it works when I just have one item in my inventory but doesn’t work when I try 2.
The plugin I am using is just called CommandPanels.
Thank you again!
So from what I can find is that you are unable to use the bound command for each specific panel, rather CommandPanels requires you to use one of the two following;
/cp [panel]
/cp [panel] [player name]
You will need to correct the items.yml for the proper panel name but I used the pvp and menu from the previous commands we set up as the panel name. If they are incorrect simply replace them. This simply now executes the command as console where it will open the panel for the %player%
that clicked the item.
Also do note these items only work when clicking them in your hand, if you want them for inventory clicks you will need to set the commands-type to be interact, inventory
.
Fixed items.yml; https://pastebin.com/iP2qEe8d
This is where I found the proper CommandPanels command; https://rockyhawk99.gitbook.io/rockyhawk-wiki/plugins/commandpanels/commands-and-permissions
Hi, i have managed to get most it all working, but i cant seem to remember how i keep the item in a players inventory when they go to a specific wold. The world i would like to keep the compass in is rss and arena. Here is my current code, thank you again so much for helping me with all this.
Ah, I don't think you saw my message from the other post you made. See; #277
Here is a fixed Pastebin of your items.yml given what I said in #277 ; https://pastebin.com/R6jWqpMJ
Also -- no problem, I am always happy to help. Sorry for the slow replies, my internet service has been heavily affected by the current pandemic situation.