RockinChaos / ItemJoin

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

Enabled World's Bug #529

Closed SirCraftypants closed 1 year ago

SirCraftypants commented 1 year ago

Server Version

PaperSpigot 1.19.4

Resource Version

ItemJoin-6.0.0-SNAPSHOT-b879

Dump Information

https://pastebin.com/rhUHHsK1

Describe The Bug

When i teleport from bskyblock_world to world lobby, it does not remove the item with the below enabled world settings.

enabled-worlds: bskyblock_world, bskyblock_world_nether, bskyblock_world_the_end

When teleporting to bskyblock_world from world lobby, it does not remove the item with the below enabled world settings.

enabled-worlds: Lobby, world

?

Expected Behavior

Both items should be removed from inventory when not an enabled world.

Steps To Reproduce

Use the same idea and teleport from and too each world.

Additional Info

No response

Checklist

SirCraftypants commented 1 year ago

I thought enabled worlds would remove items upon leaving as well as give the worlds items upon joining?

RockinChaos commented 1 year ago

As per the wiki items do not get automagically removed, you must tell them you want that functionality. The auto-remove itemflag will accomplish this.

Wiki snippet; auto-remove - Upon performing one of the defined triggers for the item, if the custom item is found in the player's inventory and is in a world which is not defined under the enabled-worlds it will be automatically removed. This best works with the world-switch trigger that way when players switch to a world that is not enabled for the item, it will simply be removed.

Also, you accidentally checked too many boxes in the checklist.

SirCraftypants commented 1 year ago

As per the wiki items do not get automagically removed, you must tell them you want that functionality. The auto-remove itemflag will accomplish this.

Wiki snippet; auto-remove - Upon performing one of the defined triggers for the item, if the custom item is found in the player's inventory and is in a world which is not defined under the enabled-worlds it will be automatically removed. This best works with the world-switch trigger that way when players switch to a world that is not enabled for the item, it will simply be removed.

Also, you accidentally checked too many boxes in the checklist.

Thank you, i did check the wiki, i just misunderstood how enabled worlds works as didn't realize a flag did what i thought enabled worlds did. Ah you put a trick question in the list.