Closed czerk89 closed 7 months ago
You might already have figured it out, but I think this might actually be a bug. So when an item is in slot 0-8 (quick bar), it works in either CREATIVE or SURVIVAL. But when I move it to 9-35, it stops working in CREATIVE, but works in SURVIVAL.
I tested this item in both slot 6 and 34:
fly-item:
id: FIREWORK_ROCKET
name: '&eFlying Token'
slot: 34
lore:
- '&7Click to toggle flying mode!'
interact:
- 'delay: 1'
- fly
inventory:
- 'delay: 1'
- fly
itemflags: inventory-modify, hide-flags, death-drops, self-drops, unbreakable, clear-items, item-store
triggers: join, respawn, world-switch
permission-node: itemjoin.dragonhub
enabled-worlds: castle, arthur*, ben
It worked in slot 6 in SURVIVAL and CREATIVE. But only worked in SURVIVAL in slot 34.
You might already have figured it out, but I think this might actually be a bug. So when an item is in slot 0-8 (quick bar), it works in either CREATIVE or SURVIVAL. But when I move it to 9-35, it stops working in CREATIVE, but works in SURVIVAL.
I tested this item in both slot 6 and 34:
fly-item: id: FIREWORK_ROCKET name: '&eFlying Token' slot: 34 lore: - '&7Click to toggle flying mode!' interact: - 'delay: 1' - fly inventory: - 'delay: 1' - fly itemflags: inventory-modify, hide-flags, death-drops, self-drops, unbreakable, clear-items, item-store triggers: join, respawn, world-switch permission-node: itemjoin.dragonhub enabled-worlds: castle, arthur*, ben
It worked in slot 6 in SURVIVAL and CREATIVE. But only worked in SURVIVAL in slot 34.
Okay, so this is intended. The action of the inventory closing is a result of the inventory-modify
itemflag.
To prevent item duplication I have to force close the player's inventory because the creative events are glitchy and not programmed well by Mojang/Microsoft.
Since it's nothing on my end I can fix this is why most developers suggest using an Emulated Creative mode plugin instead of actual creative mode since it's easy to exploit. Unfortunately, that's the result until Microsoft decides to re-code creative mode.
As for the command not executing this is because you haven't told ItemJoin to listen for Creative inventory events.
You need to use inventory-creative
for creative (as per the wiki).
Note: The inventory will still close to prevent potential bugging and item duplication.
So your item should look like this;
fly-item:
id: FIREWORK_ROCKET
name: '&eFlying Token'
slot: 34
lore:
- '&7Click to toggle flying mode!'
interact:
- 'delay: 1'
- fly
inventory:
- 'delay: 1'
- fly
inventory-creative:
- 'delay: 1'
- fly
itemflags: inventory-modify, hide-flags, death-drops, self-drops, unbreakable, clear-items, item-store
triggers: join, respawn, world-switch
permission-node: itemjoin.dragonhub
enabled-worlds: castle, arthur*, ben
I hope that makes sense! Let me know~
That makes a lot of sense! Thank you!
Server Version
paper-1.20.4-454
Resource Version
6.0.5-RELEASE-b928
Dump Information
https://ci.craftationgaming.com/dump/?id=epujifuqoz
Describe The Problem
I have the following item set up:
This item works in all my non-creative worlds. But it doesn't work in creative worlds. When I click it in my creative world, it just closes the inventory and does nothing. Here are debugging steps I've taken:
/mvtp dragonhub
command manually in that world to make sure I have permission to run it in creative mode. So it's not permission./mvm set gamemode survival world_creative
, and all of a sudden the items started working. If I change back to creative, they stop again. So it's not something specific to the world, but the gamemode.CREATIVE
from the config underBypass
.At this point, I'm fairly positive it's something with ItemJoin--likely a setting I missed and not a bug. Any guidance would be appreciated.
Additional Context
No response
Checklist