mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-30 17:13:43 +01:00 
			
		
		
		
	Experimental allow plot clearing on mega plots
This commit is contained in:
		| @@ -77,9 +77,9 @@ public class Clear extends SubCommand { | ||||
|             MainUtil.sendMessage(plr, C.COMMAND_SYNTAX, "/plot clear [X;Z|mine]"); | ||||
|             return sendMessage(plr, C.NOT_IN_PLOT); | ||||
|         } | ||||
|         if (!MainUtil.getTopPlot(plot).equals(MainUtil.getBottomPlot(plot))) { | ||||
|             return sendMessage(plr, C.UNLINK_REQUIRED); | ||||
|         } | ||||
| //        if (!MainUtil.getTopPlot(plot).equals(MainUtil.getBottomPlot(plot))) { | ||||
| //            return sendMessage(plr, C.UNLINK_REQUIRED); | ||||
| //        } | ||||
|         if (((plot == null) || !plot.hasOwner() || !plot.isOwner(UUIDHandler.getUUID(plr))) && !Permissions.hasPermission(plr, "plots.admin.command.clear")) { | ||||
|             return sendMessage(plr, C.NO_PLOT_PERMS); | ||||
|         } | ||||
|   | ||||
| @@ -37,6 +37,7 @@ import com.intellectualcrafters.plot.object.PlotBlock; | ||||
| import com.intellectualcrafters.plot.object.PlotId; | ||||
| import com.intellectualcrafters.plot.object.PlotLoc; | ||||
| import com.intellectualcrafters.plot.object.PlotWorld; | ||||
| import com.intellectualcrafters.plot.object.RegionWrapper; | ||||
| import com.intellectualcrafters.plot.object.RunnableVal; | ||||
| import com.intellectualcrafters.plot.util.ChunkManager; | ||||
| import com.intellectualcrafters.plot.util.MainUtil; | ||||
| @@ -171,8 +172,8 @@ public class HybridPlotManager extends ClassicPlotManager { | ||||
|         final String world = plotworld.worldname; | ||||
|         final HybridPlotWorld dpw = ((HybridPlotWorld) plotworld); | ||||
|          | ||||
|         final Location pos1 = MainUtil.getPlotBottomLocAbs(world, plot.id).add(1, 0, 1); | ||||
|         final Location pos2 = MainUtil.getPlotTopLocAbs(world, plot.id); | ||||
|         final Location pos1 = MainUtil.getPlotBottomLoc(world, plot.id).add(1, 0, 1); | ||||
|         final Location pos2 = MainUtil.getPlotTopLoc(world, plot.id); | ||||
|         // If augmented | ||||
|         final boolean canRegen = plotworld.TYPE == 0 && plotworld.TERRAIN == 0; | ||||
|         // The component blocks | ||||
| @@ -186,7 +187,9 @@ public class HybridPlotManager extends ClassicPlotManager { | ||||
|             public void run() { | ||||
|                 // If the chunk isn't near the edge and it isn't an augmented world we can just regen the whole chunk | ||||
|                 if (canRegen && value[6] == 0) { | ||||
|                     ChunkManager.CURRENT_PLOT_CLEAR = new RegionWrapper(value[2], value[4], value[3], value[5]); | ||||
|                     ChunkManager.manager.regenerateChunk(world, new ChunkLoc(value[0], value[1])); | ||||
|                     ChunkManager.CURRENT_PLOT_CLEAR = null; | ||||
|                     return; | ||||
|                 } | ||||
|                 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 boy0001
					boy0001