2014-10-05 13:58:35 +11:00
|
|
|
package com.intellectualcrafters.plot;
|
|
|
|
|
2014-10-08 21:42:13 +11:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
import org.bukkit.Location;
|
|
|
|
import org.bukkit.World;
|
|
|
|
import org.bukkit.block.Biome;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
public abstract class PlotManager {
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-11 00:33:10 -07:00
|
|
|
/*
|
|
|
|
* Plot locations (methods with Abs in them will not need to consider mega
|
|
|
|
* plots)
|
|
|
|
*/
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-11 00:33:10 -07:00
|
|
|
public abstract PlotId getPlotIdAbs(PlotWorld plotworld, Location loc);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-11 00:33:10 -07:00
|
|
|
public abstract PlotId getPlotId(PlotWorld plotworld, Location loc);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-12 00:37:36 -07:00
|
|
|
public abstract boolean isInPlotAbs(PlotWorld plotworld, Location loc, PlotId plotid);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-11 00:33:10 -07:00
|
|
|
// If you have a circular plot, just return the corner if it were a square
|
2014-10-12 00:37:36 -07:00
|
|
|
public abstract Location getPlotBottomLocAbs(PlotWorld plotworld, PlotId plotid);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-11 00:33:10 -07:00
|
|
|
// the same applies here
|
|
|
|
public abstract Location getPlotTopLocAbs(PlotWorld plotworld, PlotId plotid);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-11 00:33:10 -07:00
|
|
|
/*
|
|
|
|
* Plot clearing (return false if you do not support some method)
|
|
|
|
*/
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-22 10:04:44 +11:00
|
|
|
public abstract boolean clearPlot(World world, Plot plot);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-22 10:04:44 +11:00
|
|
|
public abstract Location getSignLoc(World world, PlotWorld plotworld, Plot plot);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-11 00:33:10 -07:00
|
|
|
/*
|
|
|
|
* Plot set functions (return false if you do not support the specific set
|
|
|
|
* method)
|
|
|
|
*/
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-22 19:46:41 +11:00
|
|
|
public abstract boolean setWallFilling(World world, PlotWorld plotworld, PlotId plotid, PlotBlock block);
|
|
|
|
|
|
|
|
public abstract boolean setWall(World world, PlotWorld plotworld, PlotId plotid, PlotBlock block);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-22 19:46:41 +11:00
|
|
|
public abstract boolean setFloor(World world, PlotWorld plotworld, PlotId plotid, PlotBlock[] block);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-22 19:46:41 +11:00
|
|
|
public abstract boolean setBiome(World world, Plot plot, Biome biome);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-11 00:33:10 -07:00
|
|
|
/*
|
|
|
|
* PLOT MERGING (return false if your generator does not support plot
|
|
|
|
* merging)
|
|
|
|
*/
|
|
|
|
public abstract boolean createRoadEast(PlotWorld plotworld, Plot plot);
|
|
|
|
|
|
|
|
public abstract boolean createRoadSouth(PlotWorld plotworld, Plot plot);
|
|
|
|
|
|
|
|
public abstract boolean createRoadSouthEast(PlotWorld plotworld, Plot plot);
|
|
|
|
|
|
|
|
public abstract boolean removeRoadEast(PlotWorld plotworld, Plot plot);
|
|
|
|
|
|
|
|
public abstract boolean removeRoadSouth(PlotWorld plotworld, Plot plot);
|
|
|
|
|
|
|
|
public abstract boolean removeRoadSouthEast(PlotWorld plotworld, Plot plot);
|
2014-10-18 15:49:08 +11:00
|
|
|
|
|
|
|
public abstract boolean startPlotMerge(World world, PlotWorld plotworld, ArrayList<PlotId> plotIds);
|
|
|
|
|
|
|
|
public abstract boolean startPlotUnlink(World world, PlotWorld plotworld, ArrayList<PlotId> plotIds);
|
2014-10-11 00:33:10 -07:00
|
|
|
|
2014-10-12 00:37:36 -07:00
|
|
|
public abstract boolean finishPlotMerge(World world, PlotWorld plotworld, ArrayList<PlotId> plotIds);
|
2014-10-15 19:53:28 +11:00
|
|
|
|
|
|
|
public abstract boolean finishPlotUnlink(World world, PlotWorld plotworld, ArrayList<PlotId> plotIds);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
}
|