ItemJoin

ItemJoin

157k Downloads

[Request] Event when giving or using Items.

momoservertw opened this issue · 2 comments

commented

Is your feature request related to a problem? Please describe.
I have some servers connected with BungeeCord. Divided into Lobby and survive server.
Some items are disabled in difference server, and it is inconvenience to modify multiple configurations.

For examples,
Lobby: Can not using "Boss Summoning ticket" because it disabled the spawning mobs by Residence.
Survive: Can not getting rewards like "Points ticket" because PlayerPoints can not synchronize in servers.

Describe the solution you'd like
I think it is feasible to add a API for using Items, because there are too many Plugins and adding lots of conditions are difficult or taking a long time to finsh it.

Event:

  1. ItemJoinGivingEvent: When giving an item.
  • setCancelled()
  • getItem() -> (ItemStack) To get this Item stack.
  • getItemJoin() -> (ItemJoin) To get this Item attributes included "getNode(), getItemflags(), getCommands...".
  1. ItemJoinUsingEvent: When using an item.
  • setCancelled()
  • getItem() -> (ItemStack) To get this Item stack.
  • getItemJoin() -> (ItemJoin) To get this Item attributes included "getNode(), getItemflags(), getCommands...".

Describe alternatives you've considered

  1. Custom using conditions.
    #236
    This is also a method, but I don't know which one is easier to achieve.

Additional context
Thank you for updating ItemJoin and response all issues and request for us. : )

I’m taking a graduate exam recently, and I may reply to you later.
(There is a language barrier for me haha)
I wish you success at work or school!

commented

So I am starting to progress on this feature request, I added the custom conditions as suggested in #236 does this fill this feature request?

I can look into adding the events described above if the custom conditions do not fill this requirement.

commented

Yes, the conditions of giving and using is very helpful.
Thanks a lot~~ : ))