2014-10-05 13:58:35 +11:00
|
|
|
package com.intellectualcrafters.plot;
|
|
|
|
|
|
|
|
import org.bukkit.Location;
|
|
|
|
import org.bukkit.World;
|
|
|
|
import org.bukkit.block.Biome;
|
|
|
|
import org.bukkit.block.Block;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
public abstract class PlotManager {
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
/*
|
2014-10-05 22:19:35 +11:00
|
|
|
* Plot locations (methods with Abs in them will not need to consider mega
|
|
|
|
* plots)
|
2014-10-05 13:58:35 +11:00
|
|
|
*/
|
2014-10-05 22:19:35 +11:00
|
|
|
|
|
|
|
public abstract PlotId getPlotIdAbs(PlotWorld plotworld, Location loc);
|
|
|
|
|
|
|
|
public abstract boolean isInPlotAbs(PlotWorld plotworld, Location loc, Plot plot);
|
|
|
|
// If you have a circular plot, just return the corner if it were a square
|
|
|
|
public abstract Location getPlotBottomLocAbs(PlotWorld plotworld, Plot plot);
|
|
|
|
// the same applies here
|
|
|
|
public abstract Location getPlotTopLocAbs(PlotWorld plotworld, Plot plot);
|
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
/*
|
2014-10-05 22:19:35 +11:00
|
|
|
* Plot clearing (return false if you do not support some method)
|
|
|
|
*
|
|
|
|
*
|
2014-10-05 13:58:35 +11:00
|
|
|
*/
|
2014-10-05 22:19:35 +11:00
|
|
|
|
|
|
|
public abstract boolean clearPlot(Player player, Plot plot, boolean mega);
|
|
|
|
|
|
|
|
public abstract boolean clearSign(Player player, Plot plot, boolean mega);
|
|
|
|
|
|
|
|
// clearEntities also needs to clear Player entities (e.g. teleport them to the surface)
|
|
|
|
public abstract boolean clearEntities(Player player, Plot plot, boolean mega);
|
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
/*
|
2014-10-05 22:19:35 +11:00
|
|
|
* Plot set functions (return false if you do not support the specific set
|
|
|
|
* method)
|
2014-10-05 13:58:35 +11:00
|
|
|
*/
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
public abstract boolean setWall(Player player, Plot plot, Block block);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
public abstract boolean setBiome(Player player, Plot plot, Biome biome);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
/*
|
2014-10-05 22:19:35 +11:00
|
|
|
* PLOT MERGING (return false if your generator does not support plot
|
|
|
|
* merging)
|
2014-10-05 13:58:35 +11:00
|
|
|
*/
|
|
|
|
public abstract boolean createRoadEast(Plot plot);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
public abstract boolean createRoadSouth(Plot plot);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
public abstract boolean createRoadSouthEast(Plot plot);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
public abstract boolean removeRoadEast(Plot plot);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
public abstract boolean removeRoadSouth(Plot plot);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
public abstract boolean removeRoadSouthEast(Plot plot);
|
2014-10-05 22:19:35 +11:00
|
|
|
|
2014-10-05 13:58:35 +11:00
|
|
|
}
|