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 ClaimCreatedEvent and ClaimModifiedEvent #344
Conversation
1. Claim creation event... this is fired once all the claim creation checks have been passed. It can be cancelled. It contains the claim and the creating player 2. Claim modification event - this is fired as the claim is modified - it cannot be cancelled. It contains the claim and the modifier...which can be null. Use Case: This could be used so other plugins can hook gp and perform an action if a claim is created or changed. Something as simple as logging claim creations/modifications and deletions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, will pull after the 1.13 PR.
import org.bukkit.OfflinePlayer; | ||
import org.bukkit.World; | ||
import me.ryanhamshire.GriefPrevention.events.ClaimModifyEvent; | ||
import org.bukkit.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make your IDE not do this please (wildcard imports)? Thanks.
Only other minor critique is that the event name could be swapped to something more consistent such as ModifyClaimEvent. |
1. Claim creation event... this is fired once all the claim creation checks have been passed. It can be cancelled. It contains the claim and the creating player 2. Claim modification event - this is fired as the claim is modified - it cannot be cancelled. It contains the claim and the modifier...which can be null. Use Case: This could be used so other plugins can hook gp and perform an action if a claim is created or changed. Something as simple as logging claim creations/modifications and deletions.
I adjusted the Event name ...but to keep it consistent with existing events I went with ClaimModifiedEvent... |
So the new ones are
|
Additional changes
Use Case:
This could be used so other plugins can hook gp and perform an action if a claim is created or changed. Something as simple as logging claim creations/modifications and deletions.