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
QuarterDeleteEventwhich is fired when a quarter is deleted. The event is fired with aCauseso 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 theCauseisCause.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.