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;
|
|
|
|
|
|
|
|
public abstract class PlotManager {
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
/*
|
|
|
|
* Plot locations (methods with Abs in them will not need to consider mega
|
|
|
|
* plots)
|
|
|
|
*/
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract PlotId getPlotIdAbs(final PlotWorld plotworld, final Location loc);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract PlotId getPlotId(final PlotWorld plotworld, final Location loc);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean isInPlotAbs(final PlotWorld plotworld, final Location loc, final PlotId plotid);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
// If you have a circular plot, just return the corner if it were a square
|
|
|
|
public abstract Location getPlotBottomLocAbs(final PlotWorld plotworld, final PlotId plotid);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
// the same applies here
|
|
|
|
public abstract Location getPlotTopLocAbs(final PlotWorld plotworld, final PlotId plotid);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
/*
|
|
|
|
* Plot clearing (return false if you do not support some method)
|
|
|
|
*/
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean clearPlot(final World world, final Plot plot);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract Location getSignLoc(final World world, final PlotWorld plotworld, final Plot plot);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
/*
|
|
|
|
* Plot set functions (return false if you do not support the specific set
|
|
|
|
* method)
|
|
|
|
*/
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean setWallFilling(final World world, final PlotWorld plotworld, final PlotId plotid, final PlotBlock block);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean setWall(final World world, final PlotWorld plotworld, final PlotId plotid, final PlotBlock block);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean setFloor(final World world, final PlotWorld plotworld, final PlotId plotid, final PlotBlock[] block);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean setBiome(final World world, final Plot plot, final Biome biome);
|
2014-10-11 00:33:10 -07:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
/*
|
|
|
|
* PLOT MERGING (return false if your generator does not support plot
|
|
|
|
* merging)
|
|
|
|
*/
|
|
|
|
public abstract boolean createRoadEast(final PlotWorld plotworld, final Plot plot);
|
2014-10-11 00:33:10 -07:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean createRoadSouth(final PlotWorld plotworld, final Plot plot);
|
2014-10-11 00:33:10 -07:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean createRoadSouthEast(final PlotWorld plotworld, final Plot plot);
|
2014-10-11 00:33:10 -07:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean removeRoadEast(final PlotWorld plotworld, final Plot plot);
|
2014-10-11 00:33:10 -07:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean removeRoadSouth(final PlotWorld plotworld, final Plot plot);
|
2014-10-11 00:33:10 -07:00
|
|
|
|
2014-11-05 14:42:08 +11:00
|
|
|
public abstract boolean removeRoadSouthEast(final PlotWorld plotworld, final Plot plot);
|
|
|
|
|
|
|
|
public abstract boolean startPlotMerge(final World world, final PlotWorld plotworld, final ArrayList<PlotId> plotIds);
|
|
|
|
|
|
|
|
public abstract boolean startPlotUnlink(final World world, final PlotWorld plotworld, final ArrayList<PlotId> plotIds);
|
|
|
|
|
|
|
|
public abstract boolean finishPlotMerge(final World world, final PlotWorld plotworld, final ArrayList<PlotId> plotIds);
|
|
|
|
|
|
|
|
public abstract boolean finishPlotUnlink(final World world, final PlotWorld plotworld, final ArrayList<PlotId> plotIds);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
}
|