ItemJoin

ItemJoin

157k Downloads

ItemJoin/ChestCommands Menu Item Trouble

nateebling5 opened this issue ยท 2 comments

commented

Thanks for taking the time to open an assistance request!

Please describe your question or what you need help with, in the best detain you can.
A clear and concise description of what the problem is. Ex. I need help creating a custom item that is given to the player on join. I want it to be a Diamond Sword and [...]

I have two questions regarding the same custom item I am attempting to use. Note: I am using the ChestCommands plugin with ItemJoin to create a menu item that players receive when in the central spawn hub of my server. I created the item which I named "Teleporter", which is meant to be used to access a menu that allows a player to teleport between worlds. The teleport commands work fine, but I noticed that the item also teleports the player to their cursor location when interacting. ChestCommands is set so that right clicking with the item in your hand opens the menu, but this is also what triggers the unwanted and premature teleportation. For example, if I were to open the menu with the item while looking at my feet, I would teleport into the ground and get stuck. The menu does not close and interacting further with the menu allows the user to teleport to the desired world as intended. I would like to remove undesired "teleporting to cursor" if possible. I made the item.yml very basic and as far as I am aware, there is nothing in there that would result in a "teleport to cursor" command. The same is true for my ChestCommands menu config. I'm not really sure what else would cause this issue.

The second question I had regarding this same item was if it is possible to make this item always appear in a players inventory if they are in a certain world. As I mentioned previously, the function is to act as a teleporter menu for players so that they can travel to different worlds in my server. At the moment, a player spawns in the central hub with the desired item, but after teleporting to another world and returning back to the hub, the item is gone (I have it so that inventories are kept on separate worlds, but not transferred between them). The player loses the item when they teleport, and this is what I want, but I also want them to get it back if they return to the hub. Is it possible to force this item to always be in a players inventory whenever they enter a specific world?

Any help/feedback for these issues would be much appreciated. Please let me know I need to provide any additional details/files.

ItemJoin config: https://pastebin.com/3ghAxjCz
ItemJoin items.yml: https://pastebin.com/RJZs5BWP
ChestCommands menu config: https://pastebin.com/2cXThbQe

v5.2.2
Paper 1.16.5

commented

Update:

I have resolved the first issue. There was a conflict with another plugin I had installed, and after switching the item, everything is working fine.

I would still appreciate help with my second question.

commented

I sincerely apologize for the late reply, ItemJoin has grown immensely in popularity over the past few months and it has been really hard for me to keep up with the number of tickets.

So as I can see your config.yml has world-switch enabled for clearing ItemJoin items. If you use a Multi-Inventory plugin (aka per-world) then you can set this to false. However, if you intend to keep this set to true you will need to add these triggers to your item to re-get the item when switching worlds. triggers: JOIN, WORLD-SWITCH

So your item should look like;

  teleporter:
    id: COMPASS
    slot: 0
    name: '&aTeleporter'
    lore:
       -'Use this to teleport between worlds.'
    triggers: JOIN, WORLD-SWITCH
    enabled-worlds: Spawn2

OR an alternative to this is to simply set your Default-Triggers in your config.yml to JOIN, WORLD-SWITCH as you have no triggers currently defined for your item so it will default to that.

Let me know if that does/does not answer your question!

EDIT: Closing this issue due to inactivity, please re-open this issue if you need additional help!