ItemJoin

ItemJoin

157k Downloads

Item that has `limit-modes` set doesn't generate on `world-switch` trigger

czerk89 opened this issue ยท 2 comments

commented

Server Version

paper-1.20.4-454

Resource Version

6.0.6-SNAPSHOT-b978

Dump Information

https://ci.craftationgaming.com/dump?id=operuwumal

Describe The Bug

An item that has limit-modes set doesn't generate on world-switch. This happens if the limit-modes is set to either CREATIVE or SURVIVAL. And this happens even if the world that you're teleporting into is CREATIVE or SURVIVAL.

Expected Behavior

On world switch to a CREATIVE world, the item that has limit-modes: CREATIVE should generate. On world switch to a SURVIVAL world, the item that has limit-modes: SURVIVAL should generate.

Steps To Reproduce

  1. Create a SURVIVAL and CREATIVE world
  2. Create these two items:
  gamemode-creative-item:
    id: BEACON
    name: '&eGamemode Switcher'
    limit-modes: SURVIVAL
    slot: 7
    lore:
    - '&7Press switch to creative mode.'
    interact:
    - 'console: gamemode creative %player%'
    - 'message: &eYou are now in creative mode.'
    - 'player: [close]'
    commands-sound: BLOCK_NOTE_BLOCK_PLING
    itemflags: inventory-modify, hide-flags, death-drops, self-drops, unbreakable, item-store, overwrite, cancel-events, inventory-close, move-next, death-keep, placement, death-drops
    triggers: join, respawn, gamemode-switch, world-switch
    permission-node: itemjoin.gamemode
    enabled-worlds: world
  gamemode-survival-item:
    id: BEACON
    name: '&eGamemode Switcher'
    limit-modes: CREATIVE
    slot: 7
    lore:
    - '&7Press switch to survival mode.'
    interact:
    - 'console: gamemode survival %player%'
    - 'message: &eYou are now in survival mode.'
    - 'player: [close]'
    commands-sound: BLOCK_NOTE_BLOCK_PLING
    itemflags: inventory-modify, hide-flags, death-drops, self-drops, unbreakable, item-store, overwrite, cancel-events, inventory-close, move-next, death-keep, placement, death-drops
    triggers: join, respawn, gamemode-switch, world-switch
    permission-node: itemjoin.gamemode
    enabled-worlds: world
  1. /mvtp into either world, and neither item generates.
  2. Run /gamemode creative or /gamemode survival (depending on the world), and then items appear. That tells me the gamemode-switch trigger is working, but not the world-switch.

If you delete the limit-modes then the items generate. So that tells me it's something with limit-modes.

Additional Info

No response

Checklist

  • I am running latest version of this resource.
  • I have read the wiki to make sure it's not an issue with configuration.
  • I ticked all of these boxes without actually reading them.
  • I have checked that my bug report is unique and a previous report does not exist.
commented

Odd from my testing this was actually functional with world-switching
Will double-check.

commented

Seems the issue is related to #587 as I can't replicate this after providing this fix.

Link; https://ci.craftationgaming.com/downloads
Remember to remove your old ItemJoin.jar file

Let me know!~

EDIT: Offical release is now available;
Link; https://www.spigotmc.org/resources/itemjoin.12661/download?version=542784