mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Implement PlotComponentSetEvent
This commit is contained in:
@ -7,9 +7,9 @@ import com.intellectualcrafters.plot.object.PlotBlock;
|
||||
import com.intellectualcrafters.plot.object.PlotId;
|
||||
import com.intellectualcrafters.plot.object.PseudoRandom;
|
||||
import com.intellectualcrafters.plot.object.RegionWrapper;
|
||||
import com.intellectualcrafters.plot.util.EventUtil;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.SetQueue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
@ -22,27 +22,35 @@ public class ClassicPlotManager extends SquarePlotManager {
|
||||
switch (component) {
|
||||
case "floor":
|
||||
setFloor(plotworld, plotid, blocks);
|
||||
EventUtil.manager.callComponentSet(plotworld.getPlot(plotid), component);
|
||||
return true;
|
||||
case "wall":
|
||||
setWallFilling(plotworld, plotid, blocks);
|
||||
EventUtil.manager.callComponentSet(plotworld.getPlot(plotid), component);
|
||||
return true;
|
||||
case "all":
|
||||
setAll(plotworld, plotid, blocks);
|
||||
EventUtil.manager.callComponentSet(plotworld.getPlot(plotid), component);
|
||||
return true;
|
||||
case "air":
|
||||
setAir(plotworld, plotid, blocks);
|
||||
EventUtil.manager.callComponentSet(plotworld.getPlot(plotid), component);
|
||||
return true;
|
||||
case "main":
|
||||
setMain(plotworld, plotid, blocks);
|
||||
EventUtil.manager.callComponentSet(plotworld.getPlot(plotid), component);
|
||||
return true;
|
||||
case "middle":
|
||||
setMiddle(plotworld, plotid, blocks);
|
||||
EventUtil.manager.callComponentSet(plotworld.getPlot(plotid), component);
|
||||
return true;
|
||||
case "outline":
|
||||
setOutline(plotworld, plotid, blocks);
|
||||
EventUtil.manager.callComponentSet(plotworld.getPlot(plotid), component);
|
||||
return true;
|
||||
case "border":
|
||||
setWall(plotworld, plotid, blocks);
|
||||
EventUtil.manager.callComponentSet(plotworld.getPlot(plotid), component);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -31,6 +31,8 @@ public abstract class EventUtil {
|
||||
|
||||
public abstract boolean callTeleport(PlotPlayer player, Location from, Plot plot);
|
||||
|
||||
public abstract boolean callComponentSet(Plot plot, String component);
|
||||
|
||||
public abstract boolean callClear(Plot plot);
|
||||
|
||||
public abstract void callDelete(Plot plot);
|
||||
|
@ -26,6 +26,8 @@ public class EventUtilTest extends EventUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public boolean callComponentSet(Plot plot, String component) { return false; }
|
||||
|
||||
@Override public boolean callClear(Plot plot) {
|
||||
return false;
|
||||
}
|
||||
@ -61,4 +63,4 @@ public class EventUtilTest extends EventUtil {
|
||||
@Override public void callTrusted(PlotPlayer initiator, Plot plot, UUID player, boolean added) {}
|
||||
|
||||
@Override public void callMember(PlotPlayer initiator, Plot plot, UUID player, boolean added) {}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user