RockinChaos / ItemJoin

Get custom items on join.
https://www.craftationgaming.com/
GNU Lesser General Public License v3.0
138 stars 36 forks source link

Item disappearing on death with flags and triggers set #541

Closed chaosmcdevelopment closed 1 year ago

chaosmcdevelopment commented 1 year ago

Server Version

PaperSpigot 1.19.4

Resource Version

v6.0.1-RELEASE-b892

Dump Information

https://pastebin.com/Ycs0VaQt

Describe The Problem

I'm having an issue where the server menu item disappears upon death,

Ii've set the death-keep tag as well as a trigger to give the item on death, but when the player respawns it never comes back.

I'm not sure where I made the error and would like some assistance

Additional Context

No response

Checklist

chaosmcdevelopment commented 1 year ago

Tried making a workaround with skript to give the item to the player on their respawn, but realized there is no give subcommand, just get. Might not be a bad idea to implement it.

RockinChaos commented 1 year ago

It appears you have the first-join trigger set this is why the death-keep flag doesn't work as well as why you do not get it on respawn.

first-join = you get it once and never again.

I suggest setting the trigger to simply join, respawn instead.

Also the get command is the give subcommand. If you want to force give the player one of something even if they already have it you utilize the numerical count of the number of items at the end of the command.

Ex; ij get ultra-item 1 or ij get ultra-item RockinChaos 1

If you use simply ij get ultra-item it will attempt to give the count specified in the items.yml if the player doesn't already have it. However the above example specifying the number you would like bypasses the inventory check to see if the player already has the item since you are telling ItemJoin you want x1 or x2 or x3 of an item regardless of if you already have some.

However, this command respects all limitations from the database such as enabled/disabled, first-join, ip-limited, etc so it wouldn't help you in this situation.

chaosmcdevelopment commented 1 year ago

Ahh, thank you so much. Makes sense, I didn't think about it like that. Works like a charm now.