ItemJoin

ItemJoin

157k Downloads

Illegal item movement

SlimeDog opened this issue ยท 10 comments

commented

Spigot 1.15.2 (Jenkins 2629)
Multiverse-Inventories 4.0.0-b467
ItemJoin 5.0.6-b363

I was able to move a locked item from the target slot to another slot. This should not be possible. The method:

  • Open the player inventory (E)
  • Engage CAPSLOCK key (so it remains lit)
  • Randomly press number keys 1-5 until the CLOCK item moves

The recipe is repeatable. The CLOCK item moves to slot 2 (0-based), which was empty (all slots except 8 were empty). I have not been able to move it back to the original position (slot 8).

ItemJoin/config.yml

config-Version: 7
Language: 'English'
General:
  CheckforUpdates: false
  Metrics-Logging: false
  Log-Coloration: false
  Log-Commands: true
  Debugging: false
Settings:
  HeldItem-Slot: 0
  DataTags: true
Permissions:
  Obtain-Items: false
  Obtain-Items-OP: false
  Commands-Get: false
  Commands-OP: false
  Movement-Bypass: false
Clear-Items:
  Type: ITEMJOIN
  Delay-Tick: 2
  Join: DISABLED
  World-Switch: DISABLED
  Options: PROTECT
  Bypass: DISABLED
Active-Commands:
  commands:
    - 'itemjoin get <item> <player>'
    - 'first-join: say This is a command only executed once per world, per player.'
  triggers: JOIN
  enabled-worlds: DISABLED
Prevent:
  Pickups: DISABLED
  itemMovement: DISABLED
  Bypass: DISABLED
softDepend:
  Multiverse-Core: true
  Multiverse-Inventories: true
  PlaceholderAPI: true
  Vault: true
  WorldGuard: true
  AuthMe: false
  BetterNick: false
  HeadDatabase: false
  Multiverse-Core: true
  Multiverse-Inventories: true
  MyWorlds: false
  PerWorldInventory: false
  PerWorldPlugins: false
  PlaceholderAPI: true
  TokenEnchant: false
  Vault: true
  WorldGuard: true
  xInventories: false

ItemJoin/items.yml

  changeWorld-tool:
    id: CLOCK
    slot: 8
    count: 1
    name: '&bNavigate'
    lore:
      - 'Teleport elsewhere'
    commands:
      right-click:
        - 'deluxemenus open navigation'
    enchantment: FIRE_ASPECT:1
    itemflags: cancel-events, death-drops, hide-attributes, hide-durability, inventory-modify, placement, self-drops, unbreakable
    triggers: join, respawn, world-change
    permission-node: 'deluxemenus.open'
    enabled-worlds: world, world_lobby, world_blackdog, world_city, world_luckyblock, world_minigames, world_skyblock, world_westeros, world_whitedog, world_yellowdog
commented

Stupid question but what gamemode is the player in?

commented

Not at all.

Gamemode: SURVIVAL
Difficulty: NORMAL

commented

Using your current settings I am unable to replicate this. Are you able to provide a video snippet?

commented

Sure, but the video won't show the keystrokes, so I'm not sure of the benefit.

commented

Updated recipe:

  • Open the player inventory (E)
  • Hover the cursor over the IJ-locked item (CLOCK, in this case)
  • Randomly press number keys 1-9 until the IJ-locked item moves
commented

So essentially, after extensive testing using the exact ItemJoin/Multiverse/Spigot version I am unable to replicate this issue.

I am starting to wonder if it has something to do with another plugin either interfering with the event or trying to handle the same event.

See; https://i.imgur.com/DXGPlwy.mp4

commented

Spigot 1.15.2 (Jenkins 2641)
Multiverse-Core 4.1.1-b777
Multiverse-Inventories 4.0.0-b467
ItemJoin 5.0.6-b364

With only those three plugins, in survival mode (creative mode has a different but probably related issue), I am able to perform this magic repeatedly. I just discovered that I do have control over the movement.

  • Open the inventory (E) in survival mode
  • Hover the cursor over the locked item
  • Select an open slot (1-9, since it is 1-based)
  • The item will move to the selected slot
  • The item can be moved back to slot 9 (8 in 0-based notation) by the same process
commented

OK. I will do some isolation testing -- I do have a LOT of plugins on my test servers. However, the result is within IJ's purview, I think. Per the configuration, the item should be locked in slot 8. If it moves, shouldn't it get moved back to slot 8? Even if I disconnect/reconnect or restart the server, the item is no longer in slot 8, and it not clear how to move it back (random attempts to move it again did not get it into slot 8, but maybe that would eventually succeed). I will try to delete it, to see if that forces the issue.

commented

Resolved via comment in #251. Note that one has to do this magic

  • ij remove changeWorld-tool
  • ij get changeWorld-tool

in every affected world, but the locked item cannot be moved. (Actually, it does visually move, but immediately reverts to the correct location.)

commented

It might be worthwhile adding a note to the wiki concerning the issue. If (certain?) itemflags are added to the IJ item definition, the item must be regenerated. ij reload will not do the needful.