mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -539,7 +539,6 @@ public class MemorySection implements ConfigurationSection {
|
||||
List<?> list = getList(path);
|
||||
|
||||
if (list == null) {
|
||||
PS.get().log(path + " is null");
|
||||
return new ArrayList<>(0);
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ public class Set extends SubCommand {
|
||||
}
|
||||
plot.addRunning();
|
||||
for (Plot current : plot.getConnectedPlots()) {
|
||||
manager.setComponent(plotworld, current.getId(), component, blocks);
|
||||
current.setComponent(component, blocks);
|
||||
}
|
||||
MainUtil.sendMessage(plr, C.GENERATING_COMPONENT);
|
||||
SetQueue.IMP.addTask(new Runnable() {
|
||||
|
@ -9,7 +9,6 @@ import com.intellectualcrafters.plot.object.PseudoRandom;
|
||||
import com.intellectualcrafters.plot.object.RegionWrapper;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.SetQueue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
|
@ -18,11 +18,11 @@ import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.SchematicHandler;
|
||||
import com.intellectualcrafters.plot.util.SetQueue;
|
||||
import com.intellectualcrafters.plot.util.StringMan;
|
||||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.intellectualcrafters.plot.util.UUIDHandler;
|
||||
import com.intellectualcrafters.plot.util.WorldUtil;
|
||||
import com.plotsquared.listener.PlotListener;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.geom.Area;
|
||||
import java.awt.geom.PathIterator;
|
||||
@ -2600,6 +2600,9 @@ public class Plot {
|
||||
* @return
|
||||
*/
|
||||
public boolean setComponent(String component, PlotBlock[] blocks) {
|
||||
if (StringMan.isEqualToAny(component, getManager().getPlotComponents(this.area, this.getId()))) {
|
||||
EventUtil.manager.callComponentSet(this, component);
|
||||
}
|
||||
return this.getManager().setComponent(this.area, this.getId(), component, blocks);
|
||||
}
|
||||
|
||||
|
@ -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