-
-
Notifications
You must be signed in to change notification settings - Fork 6
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 QuarterDeleteEvent #31
base: master
Are you sure you want to change the base?
Conversation
i will probably add a few events in the next few days and I can make this part of it, but I will want to rewrite the logic around it what does this event need to be able to do so I can make sure I add it properly and what other events would you like added if any |
Ideally:
Other events:
|
for the cuboid ones would that be for the edit commands? |
That's correct |
@galacticwarrior9 i made some changes, thinking i should probably add the delete plot and delete all ones to their own event though, i also made the decision to remove CONTAINS_WILDERNESS and will make that throw a non-cancellable event through the delete method with no args, other than that let me know if there's any issues before i merge it |
going to think about how i'll change around the old delete method to handle adding a cause to the post quarter delete event, might deprecate the no args one |
This all looks fine to me. |
This fixes the event throwing an java.lang.IllegalStateException if the building is deleted off the main thread
This PR adds a cancellable
QuarterDeleteEvent
which is fired when a quarter is deleted. The event is fired with aCause
so that plugins can see the deletion reason. If the event is cancelled, a message is sent to the deleting player if one exists. Quarters will be deleted regardless of the event's cancellation state if theCause
isCause.CONTAINS_WILDERNESS
.I have kept the original deletion method since I am unsure what to do with it. All of its internal uses have been replaced with a new deletion method which fires this event.