mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
allow plugins extending and replacing RegionManager to be notified of, and "accept" plot clear "requests".
. . . . . FAWE
This commit is contained in:
parent
eff410d1da
commit
b71de856a8
@ -29,6 +29,7 @@ import com.plotsquared.core.PlotSquared;
|
|||||||
import com.plotsquared.core.location.Location;
|
import com.plotsquared.core.location.Location;
|
||||||
import com.plotsquared.core.plot.Plot;
|
import com.plotsquared.core.plot.Plot;
|
||||||
import com.plotsquared.core.plot.PlotArea;
|
import com.plotsquared.core.plot.PlotArea;
|
||||||
|
import com.plotsquared.core.plot.PlotManager;
|
||||||
import com.plotsquared.core.queue.LocalBlockQueue;
|
import com.plotsquared.core.queue.LocalBlockQueue;
|
||||||
import com.plotsquared.core.util.task.RunnableVal;
|
import com.plotsquared.core.util.task.RunnableVal;
|
||||||
import com.plotsquared.core.util.task.TaskManager;
|
import com.plotsquared.core.util.task.TaskManager;
|
||||||
@ -163,6 +164,20 @@ public abstract class RegionManager {
|
|||||||
return queue.enqueue();
|
return queue.enqueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notify any plugins that may want to modify clear behaviour that a clear is occuring
|
||||||
|
*
|
||||||
|
* @return true if the notified will accept the clear task
|
||||||
|
*/
|
||||||
|
public boolean notifyClear() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only called when {@link RegionManager#notifyClear()} returns true in specific PlotManagers
|
||||||
|
*/
|
||||||
|
public abstract boolean handleClear(Plot plot, final Runnable whenDone, PlotManager manager);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy a region to a new location (in the same world)
|
* Copy a region to a new location (in the same world)
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user