-
-
Notifications
You must be signed in to change notification settings - Fork 754
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 Events for Plot Move + Plot Swap #3769
base: main
Are you sure you want to change the base?
Conversation
Validated the functionality of this change using a simple addon plugin: public class TestAddonPlugin extends JavaPlugin {
@Override
public void onEnable() {
new PlotAPI().registerListener(new Object() {
@Subscribe
public void onPlotMove(PlotMoveEvent event) {
event.setEventResult(Result.DENY);
System.out.println("cancelled");
}
@Subscribe
public void onPostPlotMove(PostPlotMoveEvent event) {
System.out.println("Plot was moved");
}
});
}
} The FORCE result may be used to move the plot to occupied places as well? Opinions about that @IntellectualSites/plotsquared-team? |
The destination of the move should be able to be changed in the event. Also, the FORCE result needs to be implemented (the event call needs to be moved further up) I'd also say that a PlotSwapEvent should be added as the two commands are very similar |
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.
See above. Requesting (now) to give the label
Please take a moment and address the merge conflicts of your pull request. Thanks! |
aef7910
to
c4da114
Compare
Revived this PR (after pushing to the wrong remote). Did a few test cases and it seems to work for me (Had to force-push sadly) |
Overview
Fixes #3692
Description
Adds a cancellable PlotMoveEvent and informational PostPlotMoveEvent. (+ Swap)
Found no fitting case for handling the FORCE result, therefor marked that as not supported (just supporting DENY and ACCEPT).Submitter Checklist
@since TODO
.