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

add new PSBreakEvent #419

Merged
merged 4 commits into from
Jul 3, 2024
Merged

add new PSBreakEvent #419

merged 4 commits into from
Jul 3, 2024

Conversation

rinpr
Copy link
Contributor

@rinpr rinpr commented Jul 3, 2024

this event will called if the player has broken the protection stone. this might be useful for other plugin's addon or skript developer.

@espidev
Copy link
Owner

espidev commented Jul 3, 2024

Note that this event would fire even if the player doesn't have permission to break the block (is that intended?), because it's early in the event chain.

I recommend naming it PSBreakProtectBlockEvent

@espidev
Copy link
Owner

espidev commented Jul 3, 2024

Perhaps you want to add the event trigger here: https://github.com/espidev/ProtectionStones/blob/master/src/main/java/dev/espi/protectionstones/ListenerClass.java#L174

This is after the player's permission is checked.

We also have a "shift-right-click" to break option that is separate, we should actually move the event trigger to there ^^

@rinpr
Copy link
Contributor Author

rinpr commented Jul 3, 2024

fixed

@espidev
Copy link
Owner

espidev commented Jul 3, 2024

Would you be open to renaming the event to PSBreakProtectBlockEvent? I think it's a bit more clear and differentiates from PSRemoveEvent.

@rinpr
Copy link
Contributor Author

rinpr commented Jul 3, 2024

sure Ill change it immediately

@espidev espidev merged commit 2d93637 into espidev:master Jul 3, 2024
1 check passed
@espidev
Copy link
Owner

espidev commented Jul 3, 2024

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants