#(pixity) Problem with pickup event when inventory is full

26 messages · Page 1 of 1 (latest)

stable mountain
#

Hey! I was coding an overflow backpack and I encountered a problem, I can't seem to get the pick up event to call when my inventory is full, not sure if this is a papermc issue, me being dumb, or a genuine issue. This specific functionality is basically the entire script's foundation. Was wondering if anyone had any experience with this and knew a method? I feel like I am over thinking it..

I tried a bunch of stuff, mainly: on player picks up item ignorecancelled:true: and on internal bukkit event event:org.bukkit.event.entity.EntityPickupItemEvent bukkit_priority:HIGHEST:

inner condorBOT
#

(pixity) Problem with pickup event when inventory is full

inner condorBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

stable mountain
#

These are my attempts from the description,

  type: world
  events:
    on player picks up item ignorecancelled:true:
      - narrate "you just picked up an item"

reflect_overflow_pick_up:
  type: world
  events:
    on internal bukkit event event:org.bukkit.event.entity.EntityPickupItemEvent bukkit_priority:HIGHEST:
    - narrate "You picked up an item!"```
covert cipher
#

I assume you're using the bukkit event as a way to see if it'll pick it up there.

stable mountain
#

yes

#

I’m either on the latest dev build or a very very recent one also

covert cipher
#

I think it's just blocking it on an internal level. There might be a hacky way around this.

stable mountain
#

I was thinking that I would need to make all items not drop on the floor in general, and automatically go into the player's inventory, and if it's full it goes to the backpack. I know there's gotta be a way though so I made this thread.

covert cipher
#

There was an old thread a long time ago, or maybe it was a discussion with this exact issue and using XP orbs instead. I'm having issues finding it.

stable mountain
#

Yeah I spent around 30 minutes searching around before I made this, No luck though.

stable mountain
#

That could be a decent workaround

covert cipher
#

Continually calling that might be kind of annoying, it's a workaround solution for sure but I can't seem to find the discussion regarding this

stable mountain
#

Yeah it would be ideal if it was an event for sure. I'll look for something like what you mentioned too.

covert cipher
#

But the workaround if I'm correct is spawning XP orbs with 0 XP or flagging the XP orbs, and having the dropped item mount on top of the XP orb so it'll drift towards the player and be called when the player absorbs the experience orb.

#

!e player absorbs experience

potent kayakBOT
# covert cipher !e player absorbs experience
Required Plugins or Platforms

Paper

Group

Paper

Event Lines

player absorbs experience

Triggers

when a player is absorbing an experience orb.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.entity> returns the EntityTag of the experience orb.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

stable mountain
#

That's a perfect solution

covert cipher
#

If this works then

#

that's good.

stable mountain
#

Thank you very much for helping, I'll go try that out. It sounds correct.

covert cipher
#

If it doesn't work out then let us know.

quiet finchBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@stable mountain