Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request onBreak method with player field for blocks #1

Open
Adrian8115 opened this issue Nov 25, 2023 · 0 comments
Open

Request onBreak method with player field for blocks #1

Adrian8115 opened this issue Nov 25, 2023 · 0 comments

Comments

@Adrian8115
Copy link

❇ Feature Request | 特性请求

Description

Might it be possible to add a onBreak with a player method to Blocks?
We right now just have onBreak(Item item) { ... } but might it be possible to add a method like onBreak(Item item, Player player) { ... }

Already existing examples

The Block method getBreakTime already offers theese 2 options:

  1. getBreakTime (Item item, Player player) { ... }
  2. getBreakTime(Item item) { ... }

Smoll workarounds

I know that you still can get the player with an onBlockBreak event but,
It makes more sense to work it in the already existing onBreak method of a block ~ it also isn't maintainable for plugin devs to add many cases to the onBlockBreak event listener

final String

Have a good day

@CoolLoong CoolLoong transferred this issue from PowerNukkitX/PowerNukkitX Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant