mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared
This commit is contained in:
commit
f70e2248e7
@ -545,7 +545,7 @@ public class PS {
|
|||||||
/**
|
/**
|
||||||
* Get the raw plot object
|
* Get the raw plot object
|
||||||
* @return set of plot
|
* @return set of plot
|
||||||
* @see #setAllPlotsRaw(LinkedHashMap) to set the raw plot object
|
* @see #setAllPlotsRaw(ConcurrentHashMap) to set the raw plot object
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Set<Plot> getPlotsRaw() {
|
public Set<Plot> getPlotsRaw() {
|
||||||
@ -1649,7 +1649,7 @@ public class PS {
|
|||||||
FlagManager.addFlag(new AbstractFlag("break", new FlagValue.PlotBlockListValue()));
|
FlagManager.addFlag(new AbstractFlag("break", new FlagValue.PlotBlockListValue()));
|
||||||
FlagManager.addFlag(new AbstractFlag("use", new FlagValue.PlotBlockListValue()));
|
FlagManager.addFlag(new AbstractFlag("use", new FlagValue.PlotBlockListValue()));
|
||||||
FlagManager.addFlag(new AbstractFlag("blocked-cmds", new FlagValue.StringListValue()));
|
FlagManager.addFlag(new AbstractFlag("blocked-cmds", new FlagValue.StringListValue()));
|
||||||
FlagManager.addFlag(new AbstractFlag("ice-met", new FlagValue.BooleanValue()));
|
FlagManager.addFlag(new AbstractFlag("ice-melt", new FlagValue.BooleanValue()));
|
||||||
FlagManager.addFlag(new AbstractFlag("gamemode") {
|
FlagManager.addFlag(new AbstractFlag("gamemode") {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,6 +57,8 @@ import com.plotsquared.bukkit.util.BukkitUtil;
|
|||||||
/**
|
/**
|
||||||
* PlotSquared API
|
* PlotSquared API
|
||||||
*
|
*
|
||||||
|
|
||||||
|
|
||||||
* @version API 2.0
|
* @version API 2.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -78,11 +80,7 @@ public class PlotAPI {
|
|||||||
public PlotAPI(final JavaPlugin plugin) {}
|
public PlotAPI(final JavaPlugin plugin) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param plugin Plugin used to access this method
|
* @see PS
|
||||||
*
|
|
||||||
* @throws com.intellectualcrafters.plot.util.PlotSquaredException if the program fails to fetch the PlotSquared
|
|
||||||
* instance
|
|
||||||
* @see com.intellectualcrafters.plot.PS
|
|
||||||
*
|
*
|
||||||
* @deprecated Use this class if you just want to do a few simple things.<br>
|
* @deprecated Use this class if you just want to do a few simple things.<br>
|
||||||
* - It will remain stable for future versions of the plugin
|
* - It will remain stable for future versions of the plugin
|
||||||
@ -99,7 +97,7 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return all plots
|
* @return all plots
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.PS#getPlots()
|
* @see PS#getPlots()
|
||||||
*/
|
*/
|
||||||
public Set<Plot> getAllPlots() {
|
public Set<Plot> getAllPlots() {
|
||||||
return PS.get().getPlots();
|
return PS.get().getPlots();
|
||||||
@ -123,7 +121,7 @@ public class PlotAPI {
|
|||||||
* @param plotWorld Plot World Object
|
* @param plotWorld Plot World Object
|
||||||
* @param manager World Manager
|
* @param manager World Manager
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.PS#addPlotWorld(String, com.intellectualcrafters.plot.object.PlotWorld,
|
* @see PS#addPlotWorld(String, com.intellectualcrafters.plot.object.PlotWorld,
|
||||||
* com.intellectualcrafters.plot.object.PlotManager)
|
* com.intellectualcrafters.plot.object.PlotManager)
|
||||||
*/
|
*/
|
||||||
public void addPlotWorld(final String world, final PlotWorld plotWorld, final PlotManager manager) {
|
public void addPlotWorld(final String world, final PlotWorld plotWorld, final PlotManager manager) {
|
||||||
@ -133,7 +131,7 @@ public class PlotAPI {
|
|||||||
/**
|
/**
|
||||||
* @return main configuration
|
* @return main configuration
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.PS#config
|
* @see PS#config
|
||||||
*/
|
*/
|
||||||
public YamlConfiguration getConfig() {
|
public YamlConfiguration getConfig() {
|
||||||
return PS.get().config;
|
return PS.get().config;
|
||||||
@ -142,7 +140,7 @@ public class PlotAPI {
|
|||||||
/**
|
/**
|
||||||
* @return storage configuration
|
* @return storage configuration
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.PS#storage
|
* @see PS#storage
|
||||||
*/
|
*/
|
||||||
public YamlConfiguration getStorage() {
|
public YamlConfiguration getStorage() {
|
||||||
return PS.get().storage;
|
return PS.get().storage;
|
||||||
@ -154,7 +152,7 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return PlotSquared PlotSquared Main Class
|
* @return PlotSquared PlotSquared Main Class
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.PS
|
* @see PS
|
||||||
*/
|
*/
|
||||||
public PS getMain() {
|
public PS getMain() {
|
||||||
return PS.get();
|
return PS.get();
|
||||||
@ -241,7 +239,7 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return MainUtil
|
* @return MainUtil
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.util.MainUtil
|
* @see MainUtil
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public MainUtil getMainUtil() {
|
public MainUtil getMainUtil() {
|
||||||
@ -354,7 +352,7 @@ public class PlotAPI {
|
|||||||
* @param player Player that will receive the message
|
* @param player Player that will receive the message
|
||||||
* @param c (Caption)
|
* @param c (Caption)
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.util.MainUtil#sendMessage(PlotPlayer, C, String...)
|
* @see MainUtil#sendMessage(PlotPlayer, C, String...)
|
||||||
* com.intellectualcrafters.plot.config.C, String...)
|
* com.intellectualcrafters.plot.config.C, String...)
|
||||||
*/
|
*/
|
||||||
public void sendMessage(final Player player, final C c) {
|
public void sendMessage(final Player player, final C c) {
|
||||||
@ -367,7 +365,7 @@ public class PlotAPI {
|
|||||||
* @param player Player that will receive the message
|
* @param player Player that will receive the message
|
||||||
* @param string The message
|
* @param string The message
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.util.MainUtil#sendMessage(PlotPlayer, String)
|
* @see MainUtil#sendMessage(PlotPlayer, String)
|
||||||
*/
|
*/
|
||||||
public void sendMessage(final Player player, final String string) {
|
public void sendMessage(final Player player, final String string) {
|
||||||
MainUtil.sendMessage(BukkitUtil.getPlayer(player), string);
|
MainUtil.sendMessage(BukkitUtil.getPlayer(player), string);
|
||||||
@ -430,7 +428,7 @@ public class PlotAPI {
|
|||||||
* @return plot, null if ID is wrong
|
* @return plot, null if ID is wrong
|
||||||
*
|
*
|
||||||
* @see MainUtil#getPlotAbs(String, com.intellectualcrafters.plot.object.PlotId)
|
* @see MainUtil#getPlotAbs(String, com.intellectualcrafters.plot.object.PlotId)
|
||||||
* @see com.intellectualcrafters.plot.object.Plot
|
* @see Plot
|
||||||
*/
|
*/
|
||||||
public Plot getPlot(final World world, final int x, final int z) {
|
public Plot getPlot(final World world, final int x, final int z) {
|
||||||
return MainUtil.getPlotAbs(world.getName(), new PlotId(x, z));
|
return MainUtil.getPlotAbs(world.getName(), new PlotId(x, z));
|
||||||
@ -444,7 +442,7 @@ public class PlotAPI {
|
|||||||
* @return plot if found, otherwise it creates a temporary plot-
|
* @return plot if found, otherwise it creates a temporary plot-
|
||||||
*
|
*
|
||||||
* @see MainUtil#getPlotAbs(com.intellectualcrafters.plot.object.Location)
|
* @see MainUtil#getPlotAbs(com.intellectualcrafters.plot.object.Location)
|
||||||
* @see com.intellectualcrafters.plot.object.Plot
|
* @see Plot
|
||||||
*/
|
*/
|
||||||
public Plot getPlot(final Location l) {
|
public Plot getPlot(final Location l) {
|
||||||
return MainUtil.getPlotAbs(BukkitUtil.getLocation(l));
|
return MainUtil.getPlotAbs(BukkitUtil.getLocation(l));
|
||||||
@ -458,7 +456,7 @@ public class PlotAPI {
|
|||||||
* @return plot if found, otherwise it creates a temporary plot
|
* @return plot if found, otherwise it creates a temporary plot
|
||||||
*
|
*
|
||||||
* @see #getPlot(org.bukkit.Location)
|
* @see #getPlot(org.bukkit.Location)
|
||||||
* @see com.intellectualcrafters.plot.object.Plot
|
* @see Plot
|
||||||
*/
|
*/
|
||||||
public Plot getPlot(final Player player) {
|
public Plot getPlot(final Player player) {
|
||||||
return this.getPlot(player.getLocation());
|
return this.getPlot(player.getLocation());
|
||||||
@ -483,7 +481,7 @@ public class PlotAPI {
|
|||||||
* @param plr to search for
|
* @param plr to search for
|
||||||
* @param just_owner should we just search for owner? Or with rights?
|
* @param just_owner should we just search for owner? Or with rights?
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.object.Plot
|
* @see Plot
|
||||||
*/
|
*/
|
||||||
public Plot[] getPlots(final World world, final Player plr, final boolean just_owner) {
|
public Plot[] getPlots(final World world, final Player plr, final boolean just_owner) {
|
||||||
final ArrayList<Plot> pPlots = new ArrayList<>();
|
final ArrayList<Plot> pPlots = new ArrayList<>();
|
||||||
@ -509,7 +507,7 @@ public class PlotAPI {
|
|||||||
* @return Plot[] - array of plot objects in world
|
* @return Plot[] - array of plot objects in world
|
||||||
*
|
*
|
||||||
* @see PS#getPlots(String)
|
* @see PS#getPlots(String)
|
||||||
* @see com.intellectualcrafters.plot.object.Plot
|
* @see Plot
|
||||||
*/
|
*/
|
||||||
public Plot[] getPlots(final World world) {
|
public Plot[] getPlots(final World world) {
|
||||||
final Collection<Plot> plots = PS.get().getPlotsInWorld(world.getName());
|
final Collection<Plot> plots = PS.get().getPlotsInWorld(world.getName());
|
||||||
@ -521,7 +519,7 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return World[] - array of plot worlds
|
* @return World[] - array of plot worlds
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.PS#getPlotWorlds()
|
* @see PS#getPlotWorlds()
|
||||||
*/
|
*/
|
||||||
public String[] getPlotWorlds() {
|
public String[] getPlotWorlds() {
|
||||||
final Set<String> worlds = PS.get().getPlotWorlds();
|
final Set<String> worlds = PS.get().getPlotWorlds();
|
||||||
@ -535,7 +533,7 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return boolean (if plot world or not)
|
* @return boolean (if plot world or not)
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.PS#isPlotWorld(String)
|
* @see PS#isPlotWorld(String)
|
||||||
*/
|
*/
|
||||||
public boolean isPlotWorld(final World world) {
|
public boolean isPlotWorld(final World world) {
|
||||||
return PS.get().isPlotWorld(world.getName());
|
return PS.get().isPlotWorld(world.getName());
|
||||||
@ -548,13 +546,10 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return [0] = bottomLc, [1] = topLoc, [2] = home
|
* @return [0] = bottomLc, [1] = topLoc, [2] = home
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.util.MainUtil#getPlotBottomLoc(String,
|
* @see MainUtil#getPlotBottomLocAbs(String, PlotId)
|
||||||
* com.intellectualcrafters.plot.object.PlotId)
|
* @see MainUtil#getPlotTopLocAbs(String, PlotId)
|
||||||
* @see com.intellectualcrafters.plot.util.MainUtil#getPlotTopLoc(String,
|
* @see MainUtil#getPlotHome(String, PlotId)
|
||||||
* com.intellectualcrafters.plot.object.PlotId)
|
* @see Plot
|
||||||
* @see com.intellectualcrafters.plot.util.MainUtil#getPlotHome(String,
|
|
||||||
* com.intellectualcrafters.plot.object.Plot)
|
|
||||||
* @see com.intellectualcrafters.plot.object.Plot
|
|
||||||
*/
|
*/
|
||||||
public Location[] getLocations(final Plot p) {
|
public Location[] getLocations(final Plot p) {
|
||||||
return new Location[] {
|
return new Location[] {
|
||||||
@ -570,9 +565,8 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return plot bottom location
|
* @return plot bottom location
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.util.MainUtil#getPlotHome(String,
|
* @see MainUtil#getPlotHome(String, PlotId)
|
||||||
* com.intellectualcrafters.plot.object.Plot)
|
* @see Plot
|
||||||
* @see com.intellectualcrafters.plot.object.Plot
|
|
||||||
*/
|
*/
|
||||||
public Location getHomeLocation(final Plot p) {
|
public Location getHomeLocation(final Plot p) {
|
||||||
return BukkitUtil.getLocation(MainUtil.getPlotHome(p.world, p.id));
|
return BukkitUtil.getLocation(MainUtil.getPlotHome(p.world, p.id));
|
||||||
@ -585,9 +579,8 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return plot bottom location
|
* @return plot bottom location
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.util.MainUtil#getPlotBottomLoc(String,
|
* @see MainUtil#getPlotBottomLocAbs(String, PlotId)
|
||||||
* com.intellectualcrafters.plot.object.PlotId)
|
* @see Plot
|
||||||
* @see com.intellectualcrafters.plot.object.Plot
|
|
||||||
*/
|
*/
|
||||||
public Location getBottomLocation(final Plot p) {
|
public Location getBottomLocation(final Plot p) {
|
||||||
return BukkitUtil.getLocation(MainUtil.getPlotBottomLocAbs(p.world, p.id).subtract(1, 0, 1));
|
return BukkitUtil.getLocation(MainUtil.getPlotBottomLocAbs(p.world, p.id).subtract(1, 0, 1));
|
||||||
@ -600,8 +593,8 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return plot top location
|
* @return plot top location
|
||||||
*
|
*
|
||||||
* @see MainUtil#getPlotTopLoc(String, com.intellectualcrafters.plot.object.PlotId)
|
* @see MainUtil#getPlotTopLocAbs(String, PlotId)
|
||||||
* @see com.intellectualcrafters.plot.object.Plot
|
* @see Plot
|
||||||
*/
|
*/
|
||||||
public Location getTopLocation(final Plot p) {
|
public Location getTopLocation(final Plot p) {
|
||||||
return BukkitUtil.getLocation(MainUtil.getPlotTopLocAbs(p.world, p.id));
|
return BukkitUtil.getLocation(MainUtil.getPlotTopLocAbs(p.world, p.id));
|
||||||
@ -614,7 +607,7 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return true if the player is in a plot, false if not-
|
* @return true if the player is in a plot, false if not-
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.util.MainUtil#getPlotAbs(com.intellectualcrafters.plot.object.Location)
|
* @see MainUtil#getPlotAbs(com.intellectualcrafters.plot.object.Location)
|
||||||
*/
|
*/
|
||||||
public boolean isInPlot(final Player player) {
|
public boolean isInPlot(final Player player) {
|
||||||
return MainUtil.getPlotAbs(BukkitUtil.getLocation(player)) != null;
|
return MainUtil.getPlotAbs(BukkitUtil.getLocation(player)) != null;
|
||||||
@ -640,7 +633,7 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return PlotSquared Class
|
* @return PlotSquared Class
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.PS
|
* @see PS
|
||||||
*/
|
*/
|
||||||
public PS getPlotSquared() {
|
public PS getPlotSquared() {
|
||||||
return PS.get();
|
return PS.get();
|
||||||
@ -654,7 +647,7 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return the number of plots the player has
|
* @return the number of plots the player has
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.util.MainUtil#getPlayerPlotCount(String, PlotPlayer)
|
* @see MainUtil#getPlayerPlotCount(String, PlotPlayer)
|
||||||
*/
|
*/
|
||||||
public int getPlayerPlotCount(final World world, final Player player) {
|
public int getPlayerPlotCount(final World world, final Player player) {
|
||||||
return MainUtil.getPlayerPlotCount(world.getName(), BukkitUtil.getPlayer(player));
|
return MainUtil.getPlayerPlotCount(world.getName(), BukkitUtil.getPlayer(player));
|
||||||
@ -668,9 +661,9 @@ public class PlotAPI {
|
|||||||
*
|
*
|
||||||
* @return a set containing the players plots
|
* @return a set containing the players plots
|
||||||
*
|
*
|
||||||
* @see com.intellectualcrafters.plot.PS#getPlots(String, PlotPlayer)
|
* @see PS#getPlots(String, PlotPlayer)
|
||||||
* org.bukkit.entity.Player)
|
*
|
||||||
* @see com.intellectualcrafters.plot.object.Plot
|
* @see Plot
|
||||||
*/
|
*/
|
||||||
public Set<Plot> getPlayerPlots(final World world, final Player player) {
|
public Set<Plot> getPlayerPlots(final World world, final Player player) {
|
||||||
return PS.get().getPlots(world.getName(), BukkitUtil.getPlayer(player));
|
return PS.get().getPlots(world.getName(), BukkitUtil.getPlayer(player));
|
||||||
@ -693,7 +686,7 @@ public class PlotAPI {
|
|||||||
* Get the PlotPlayer for a player<br>
|
* Get the PlotPlayer for a player<br>
|
||||||
* - The PlotPlayer is usually cached and will provide useful functions relating to players
|
* - The PlotPlayer is usually cached and will provide useful functions relating to players
|
||||||
*
|
*
|
||||||
* @see PlotPlayer.wrap(Player|OfflinePlayer|String|UUID)
|
* @see PlotPlayer#wrap(Object)
|
||||||
*
|
*
|
||||||
* @param player
|
* @param player
|
||||||
* @return
|
* @return
|
||||||
@ -705,9 +698,9 @@ public class PlotAPI {
|
|||||||
/**
|
/**
|
||||||
* Get the PlotPlayer for a UUID (Please note that PlotSquared can be configured to provide different UUIDs than bukkit)
|
* Get the PlotPlayer for a UUID (Please note that PlotSquared can be configured to provide different UUIDs than bukkit)
|
||||||
*
|
*
|
||||||
* @see PlotPlayer.wrap(UUID uuid)
|
* @see PlotPlayer#wrap(Object)
|
||||||
*
|
*
|
||||||
* @param player
|
* @param uuid
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public PlotPlayer wrapPlayer(final UUID uuid) {
|
public PlotPlayer wrapPlayer(final UUID uuid) {
|
||||||
@ -717,7 +710,7 @@ public class PlotAPI {
|
|||||||
/**
|
/**
|
||||||
* Get the PlotPlayer for a username
|
* Get the PlotPlayer for a username
|
||||||
*
|
*
|
||||||
* @see PlotPlayer.wrap(String name)
|
* @see PlotPlayer#wrap(Object)
|
||||||
*
|
*
|
||||||
* @param player
|
* @param player
|
||||||
* @return
|
* @return
|
||||||
@ -730,7 +723,7 @@ public class PlotAPI {
|
|||||||
* Get the PlotPlayer for an offline player<br>
|
* Get the PlotPlayer for an offline player<br>
|
||||||
* Note that this will work if the player is offline, however not all functionality will work
|
* Note that this will work if the player is offline, however not all functionality will work
|
||||||
*
|
*
|
||||||
* @see PlotPlayer.wrap(OfflinePlayer op)
|
* @see PlotPlayer#wrap(Object)
|
||||||
*
|
*
|
||||||
* @param player
|
* @param player
|
||||||
* @return
|
* @return
|
||||||
|
@ -44,7 +44,7 @@ import com.plotsquared.general.commands.CommandDeclaration;
|
|||||||
|
|
||||||
@CommandDeclaration(
|
@CommandDeclaration(
|
||||||
command = "debugclaimtest",
|
command = "debugclaimtest",
|
||||||
description = "If you accidentally delete your database, this command will attempt to restore all plots based on the data from plot sighs. Execution time may vary",
|
description = "If you accidentally delete your database, this command will attempt to restore all plots based on the data from plot signs. Execution time may vary",
|
||||||
category = CommandCategory.DEBUG,
|
category = CommandCategory.DEBUG,
|
||||||
requiredType = RequiredType.CONSOLE,
|
requiredType = RequiredType.CONSOLE,
|
||||||
permission = "plots.debugclaimtest")
|
permission = "plots.debugclaimtest")
|
||||||
|
@ -38,6 +38,8 @@ import com.intellectualcrafters.plot.object.RunnableVal;
|
|||||||
import com.intellectualcrafters.plot.object.comment.PlotComment;
|
import com.intellectualcrafters.plot.object.comment.PlotComment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public interface AbstractDB {
|
public interface AbstractDB {
|
||||||
|
|
||||||
@ -71,8 +73,6 @@ public interface AbstractDB {
|
|||||||
/**
|
/**
|
||||||
* Create tables
|
* Create tables
|
||||||
*
|
*
|
||||||
* @param database Database in which the tables will be created
|
|
||||||
*
|
|
||||||
* @throws SQLException If the database manager is unable to create the tables
|
* @throws SQLException If the database manager is unable to create the tables
|
||||||
*/
|
*/
|
||||||
void createTables() throws Exception;
|
void createTables() throws Exception;
|
||||||
@ -109,8 +109,7 @@ public interface AbstractDB {
|
|||||||
/**
|
/**
|
||||||
* Get the table entry ID
|
* Get the table entry ID
|
||||||
*
|
*
|
||||||
* @param world Which the plot is located in
|
* @param plot Plot Object
|
||||||
* @param id2 Plot ID
|
|
||||||
*
|
*
|
||||||
* @return Integer = Plot Entry Id
|
* @return Integer = Plot Entry Id
|
||||||
*/
|
*/
|
||||||
@ -119,8 +118,7 @@ public interface AbstractDB {
|
|||||||
/**
|
/**
|
||||||
* Get the id of a given plot cluster
|
* Get the id of a given plot cluster
|
||||||
*
|
*
|
||||||
* @param world Which the plot is located in
|
* @param cluster PlotCluster Object
|
||||||
* @param id cluster id
|
|
||||||
*
|
*
|
||||||
* @return Integer = Cluster Entry Id
|
* @return Integer = Cluster Entry Id
|
||||||
*/
|
*/
|
||||||
@ -144,7 +142,6 @@ public interface AbstractDB {
|
|||||||
/**
|
/**
|
||||||
* Set the merged status for a plot
|
* Set the merged status for a plot
|
||||||
*
|
*
|
||||||
* @param world World in which the plot is located
|
|
||||||
* @param plot Plot Object
|
* @param plot Plot Object
|
||||||
* @param merged boolean[]
|
* @param merged boolean[]
|
||||||
*/
|
*/
|
||||||
@ -160,7 +157,6 @@ public interface AbstractDB {
|
|||||||
/**
|
/**
|
||||||
* Set plot flags
|
* Set plot flags
|
||||||
*
|
*
|
||||||
* @param world World in which the plot is located
|
|
||||||
* @param plot Plot Object
|
* @param plot Plot Object
|
||||||
* @param flags flags to set (flag[])
|
* @param flags flags to set (flag[])
|
||||||
*/
|
*/
|
||||||
@ -262,7 +258,6 @@ public interface AbstractDB {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param world
|
|
||||||
* @param cluster
|
* @param cluster
|
||||||
* @param uuid
|
* @param uuid
|
||||||
*/
|
*/
|
||||||
@ -300,7 +295,6 @@ public interface AbstractDB {
|
|||||||
/**
|
/**
|
||||||
* Remove a plot comment
|
* Remove a plot comment
|
||||||
*
|
*
|
||||||
* @param world World in which the plot is located
|
|
||||||
* @param plot Plot Object
|
* @param plot Plot Object
|
||||||
* @param comment Comment to remove
|
* @param comment Comment to remove
|
||||||
*/
|
*/
|
||||||
@ -316,7 +310,6 @@ public interface AbstractDB {
|
|||||||
/**
|
/**
|
||||||
* Set a plot comment
|
* Set a plot comment
|
||||||
*
|
*
|
||||||
* @param world World in which the plot is located
|
|
||||||
* @param plot Plot Object
|
* @param plot Plot Object
|
||||||
* @param comment Comment to add
|
* @param comment Comment to add
|
||||||
*/
|
*/
|
||||||
@ -325,10 +318,7 @@ public interface AbstractDB {
|
|||||||
/**
|
/**
|
||||||
* Get Plot Comments
|
* Get Plot Comments
|
||||||
*
|
*
|
||||||
* @param world World in which the plot is located
|
|
||||||
* @param plot Plot Object
|
* @param plot Plot Object
|
||||||
* @param tier Comment Tier
|
|
||||||
*
|
|
||||||
* @return Plot Comments within the specified tier
|
* @return Plot Comments within the specified tier
|
||||||
*/
|
*/
|
||||||
void getComments(final Plot plot, final String inbox, final RunnableVal whenDone);
|
void getComments(final Plot plot, final String inbox, final RunnableVal whenDone);
|
||||||
|
@ -66,8 +66,8 @@ public class DBFunc {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a resultset contains a column
|
* Check if a resultset contains a column
|
||||||
* @param rs
|
* @param r
|
||||||
* @param columnName
|
* @param name
|
||||||
* @return
|
* @return
|
||||||
* @throws SQLException
|
* @throws SQLException
|
||||||
*/
|
*/
|
||||||
@ -244,8 +244,7 @@ public class DBFunc {
|
|||||||
/**
|
/**
|
||||||
* Get a plot id
|
* Get a plot id
|
||||||
*
|
*
|
||||||
* @param world World
|
* @param plot Plot Object
|
||||||
* @param id2 Plot ID
|
|
||||||
*
|
*
|
||||||
* @return ID
|
* @return ID
|
||||||
*/
|
*/
|
||||||
@ -413,7 +412,6 @@ public class DBFunc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param world
|
|
||||||
* @param plot
|
* @param plot
|
||||||
* @param uuid
|
* @param uuid
|
||||||
*/
|
*/
|
||||||
@ -429,7 +427,6 @@ public class DBFunc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param world
|
|
||||||
* @param plot
|
* @param plot
|
||||||
* @param uuid
|
* @param uuid
|
||||||
*/
|
*/
|
||||||
@ -445,7 +442,6 @@ public class DBFunc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param world
|
|
||||||
* @param plot
|
* @param plot
|
||||||
* @param uuid
|
* @param uuid
|
||||||
*/
|
*/
|
||||||
@ -457,7 +453,6 @@ public class DBFunc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param world
|
|
||||||
* @param plot
|
* @param plot
|
||||||
* @param uuid
|
* @param uuid
|
||||||
*/
|
*/
|
||||||
|
@ -58,6 +58,7 @@ import com.intellectualcrafters.plot.util.StringMan;
|
|||||||
import com.intellectualcrafters.plot.util.TaskManager;
|
import com.intellectualcrafters.plot.util.TaskManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public class SQLManager implements AbstractDB {
|
public class SQLManager implements AbstractDB {
|
||||||
// Public final
|
// Public final
|
||||||
@ -185,7 +186,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param c connection
|
* @param database
|
||||||
* @param p prefix
|
* @param p prefix
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -42,6 +42,8 @@ import com.intellectualcrafters.plot.util.Permissions;
|
|||||||
/**
|
/**
|
||||||
* Flag Manager Utility
|
* Flag Manager Utility
|
||||||
*
|
*
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class FlagManager {
|
public class FlagManager {
|
||||||
@ -210,7 +212,7 @@ public class FlagManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a flag to a plot
|
* Add a flag to a plot
|
||||||
* @param plot
|
* @param origin
|
||||||
* @param flag
|
* @param flag
|
||||||
*/
|
*/
|
||||||
public static boolean addPlotFlag(final Plot origin, final Flag flag) {
|
public static boolean addPlotFlag(final Plot origin, final Flag flag) {
|
||||||
|
@ -21,7 +21,6 @@ public abstract class PlotGenerator<T> {
|
|||||||
* new AugmentedPopulator(world, generator, cluster, plotWorld.TERRAIN == 2, plotWorld.TERRAIN != 2);
|
* new AugmentedPopulator(world, generator, cluster, plotWorld.TERRAIN == 2, plotWorld.TERRAIN != 2);
|
||||||
* TYPE = 1
|
* TYPE = 1
|
||||||
* new AugmentedPopulator(world, gen_class, null, plotWorld.TERRAIN == 2, plotWorld.TERRAIN != 2);
|
* new AugmentedPopulator(world, gen_class, null, plotWorld.TERRAIN == 2, plotWorld.TERRAIN != 2);
|
||||||
* @param generator
|
|
||||||
* @param cluster Will be the cluster, or null
|
* @param cluster Will be the cluster, or null
|
||||||
* @param plotworld
|
* @param plotworld
|
||||||
*/
|
*/
|
||||||
|
@ -636,7 +636,7 @@ public class Plot {
|
|||||||
* Clear a plot
|
* Clear a plot
|
||||||
* @see MainUtil#clear(Plot, boolean, Runnable)
|
* @see MainUtil#clear(Plot, boolean, Runnable)
|
||||||
* @see MainUtil#clearAsPlayer(Plot, boolean, Runnable)
|
* @see MainUtil#clearAsPlayer(Plot, boolean, Runnable)
|
||||||
* @see #deletePlot() to clear and delete a plot
|
* @see #deletePlot(Runnable) to clear and delete a plot
|
||||||
* @param whenDone A runnable to execute when clearing finishes, or null
|
* @param whenDone A runnable to execute when clearing finishes, or null
|
||||||
*/
|
*/
|
||||||
public void clear(final Runnable whenDone) {
|
public void clear(final Runnable whenDone) {
|
||||||
@ -666,8 +666,7 @@ public class Plot {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a flag for this plot
|
* Set a flag for this plot
|
||||||
* @param flag
|
* @param flags
|
||||||
* @param value
|
|
||||||
*/
|
*/
|
||||||
public void setFlags(Set<Flag> flags) {
|
public void setFlags(Set<Flag> flags) {
|
||||||
FlagManager.setPlotFlags(this, flags);
|
FlagManager.setPlotFlags(this, flags);
|
||||||
@ -683,7 +682,7 @@ public class Plot {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the flag for a given key
|
* Get the flag for a given key
|
||||||
* @param flag
|
* @param key
|
||||||
*/
|
*/
|
||||||
public Flag getFlag(final String key) {
|
public Flag getFlag(final String key) {
|
||||||
return FlagManager.getPlotFlagRaw(this, key);
|
return FlagManager.getPlotFlagRaw(this, key);
|
||||||
@ -737,7 +736,7 @@ public class Plot {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unlink a plot and remove the roads
|
* Unlink a plot and remove the roads
|
||||||
* @see MainUtil#unlinkPlot(Plot, boolean removeRoad)
|
* @see MainUtil#unlinkPlot(Plot, boolean, boolean)
|
||||||
* @return true if plot was linked
|
* @return true if plot was linked
|
||||||
*/
|
*/
|
||||||
public boolean unlink() {
|
public boolean unlink() {
|
||||||
@ -884,7 +883,7 @@ public class Plot {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Auto merge the plot with any adjacent plots of the same owner
|
* Auto merge the plot with any adjacent plots of the same owner
|
||||||
* @see MainUtil#autoMerge(Plot, UUID) to specify the owner
|
* @see MainUtil#autoMerge(Plot, int, int, UUID, boolean) to specify the owner
|
||||||
* @param removeRoads If to remove roads when merging
|
* @param removeRoads If to remove roads when merging
|
||||||
*/
|
*/
|
||||||
public boolean autoMerge(final boolean removeRoads) {
|
public boolean autoMerge(final boolean removeRoads) {
|
||||||
@ -947,7 +946,6 @@ public class Plot {
|
|||||||
* - If the plot is not connected, it will return its own corners<br>
|
* - If the plot is not connected, it will return its own corners<br>
|
||||||
* - the returned locations will not necessarily correspond to claimed plots if the connected plots do not form a rectangular shape
|
* - the returned locations will not necessarily correspond to claimed plots if the connected plots do not form a rectangular shape
|
||||||
* @deprecated as merged plots no longer need to be rectangular
|
* @deprecated as merged plots no longer need to be rectangular
|
||||||
* @param plot
|
|
||||||
* @return new Location[] { bottom, top }
|
* @return new Location[] { bottom, top }
|
||||||
* @see MainUtil#getCorners(Plot)
|
* @see MainUtil#getCorners(Plot)
|
||||||
*/
|
*/
|
||||||
@ -961,7 +959,6 @@ public class Plot {
|
|||||||
* - If the plot is not connected, it will return itself for the top/bottom<br>
|
* - If the plot is not connected, it will return itself for the top/bottom<br>
|
||||||
* - the returned ids will not necessarily correspond to claimed plots if the connected plots do not form a rectangular shape
|
* - the returned ids will not necessarily correspond to claimed plots if the connected plots do not form a rectangular shape
|
||||||
* @deprecated as merged plots no longer need to be rectangular
|
* @deprecated as merged plots no longer need to be rectangular
|
||||||
* @param plot
|
|
||||||
* @return new Plot[] { bottom, top }
|
* @return new Plot[] { bottom, top }
|
||||||
* @see MainUtil#getCornerIds(Plot)
|
* @see MainUtil#getCornerIds(Plot)
|
||||||
*/
|
*/
|
||||||
@ -1012,12 +1009,12 @@ public class Plot {
|
|||||||
/**
|
/**
|
||||||
* Swap the plot contents and settings with another location<br>
|
* Swap the plot contents and settings with another location<br>
|
||||||
* - The destination must correspond to a valid plot of equal dimensions
|
* - The destination must correspond to a valid plot of equal dimensions
|
||||||
* @see ChunkManager#swap(String, bot1, top1, bot2, top2) to swap terrain
|
* @see ChunkManager#swap(Location, Location, Location, Location, Runnable) to swap terrain
|
||||||
* @see MainUtil#getPlotSelectionIds(PlotId, PlotId) to get the plots inside a selection
|
* @see MainUtil#getPlotSelectionIds(PlotId, PlotId) to get the plots inside a selection
|
||||||
* @see MainUtil#swapData(String, PlotId, PlotId, Runnable) to swap plot settings
|
* @see MainUtil#swapData(Plot, Plot, Runnable) to swap plot settings
|
||||||
* @param other The other plot to swap with
|
* @param destination The other plot to swap with
|
||||||
* @param whenDone A task to run when finished, or null
|
* @param whenDone A task to run when finished, or null
|
||||||
* @see MainUtil#swapData(String, PlotId, PlotId, Runnable)
|
* @see MainUtil#swapData(Plot, Plot, Runnable)
|
||||||
* @return boolean if swap was successful
|
* @return boolean if swap was successful
|
||||||
*/
|
*/
|
||||||
public boolean swap(final Plot destination, final Runnable whenDone) {
|
public boolean swap(final Plot destination, final Runnable whenDone) {
|
||||||
@ -1261,7 +1258,8 @@ public class Plot {
|
|||||||
* 2 = south<br>
|
* 2 = south<br>
|
||||||
* 3 = west<br>
|
* 3 = west<br>
|
||||||
* ----------<br>
|
* ----------<br>
|
||||||
* @param merged
|
* @param direction
|
||||||
|
* @param value
|
||||||
*/
|
*/
|
||||||
public void setMerged(int direction, boolean value) {
|
public void setMerged(int direction, boolean value) {
|
||||||
if (getSettings().setMerged(direction, value)) {
|
if (getSettings().setMerged(direction, value)) {
|
||||||
|
@ -136,7 +136,7 @@ public abstract class PlotPlayer implements CommandCaller {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the plots the player owns
|
* Get the plots the player owns
|
||||||
* @see #PS.java for more searching functions
|
* @see PS for more searching functions
|
||||||
* @see #getPlotCount() for the number of plots
|
* @see #getPlotCount() for the number of plots
|
||||||
* @return Set of plots
|
* @return Set of plots
|
||||||
*/
|
*/
|
||||||
|
@ -78,7 +78,6 @@ public class PlotSettings {
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param plot object
|
|
||||||
*/
|
*/
|
||||||
public PlotSettings() {
|
public PlotSettings() {
|
||||||
flags = new HashMap<>();
|
flags = new HashMap<>();
|
||||||
|
@ -26,7 +26,7 @@ import com.intellectualcrafters.plot.object.RegionWrapper;
|
|||||||
public class BO3Handler {
|
public class BO3Handler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see #saveBO3(null, Plot)
|
* @see #saveBO3(PlotPlayer, Plot)
|
||||||
* @param plot
|
* @param plot
|
||||||
* @return if successfully exported
|
* @return if successfully exported
|
||||||
*/
|
*/
|
||||||
|
@ -64,6 +64,7 @@ import com.plotsquared.listener.PlotListener;
|
|||||||
/**
|
/**
|
||||||
* plot functions
|
* plot functions
|
||||||
*
|
*
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public class MainUtil {
|
public class MainUtil {
|
||||||
/**
|
/**
|
||||||
@ -150,7 +151,7 @@ public class MainUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This will combine each plot into effective rectangular regions
|
* This will combine each plot into effective rectangular regions
|
||||||
* @param plot
|
* @param origin
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static HashSet<RegionWrapper> getRegions(Plot origin) {
|
public static HashSet<RegionWrapper> getRegions(Plot origin) {
|
||||||
@ -910,7 +911,7 @@ public class MainUtil {
|
|||||||
/**
|
/**
|
||||||
* direction 0 = north, 1 = south, etc:
|
* direction 0 = north, 1 = south, etc:
|
||||||
*
|
*
|
||||||
* @param id
|
* @param plot
|
||||||
* @param direction
|
* @param direction
|
||||||
*
|
*
|
||||||
* @return Plot relative
|
* @return Plot relative
|
||||||
@ -1907,9 +1908,7 @@ public class MainUtil {
|
|||||||
* Gets the top loc of a plot (if mega, returns top loc of that mega plot) - If you would like each plot treated as
|
* Gets the top loc of a plot (if mega, returns top loc of that mega plot) - If you would like each plot treated as
|
||||||
* a small plot use getPlotTopLocAbs(...)
|
* a small plot use getPlotTopLocAbs(...)
|
||||||
*
|
*
|
||||||
* @param world
|
* @param plot
|
||||||
* @param id
|
|
||||||
*
|
|
||||||
* @return Location top of mega plot
|
* @return Location top of mega plot
|
||||||
*/
|
*/
|
||||||
public static Location getPlotTopLoc_(Plot plot) {
|
public static Location getPlotTopLoc_(Plot plot) {
|
||||||
|
@ -281,7 +281,7 @@ public class NbtFactory {
|
|||||||
* Represents a root NBT list.
|
* Represents a root NBT list.
|
||||||
* See also:
|
* See also:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@link NbtFactory#createNbtList()}</li>
|
* <li>{@link NbtFactory#createList(Iterable)}}</li>
|
||||||
* <li>{@link NbtFactory#fromList(Object)}</li>
|
* <li>{@link NbtFactory#fromList(Object)}</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* @author Kristian
|
* @author Kristian
|
||||||
@ -408,7 +408,7 @@ public class NbtFactory {
|
|||||||
/**
|
/**
|
||||||
* Construct a new NBT compound.
|
* Construct a new NBT compound.
|
||||||
* <p>
|
* <p>
|
||||||
* Use {@link NbtCompound#asMap()} to modify it.
|
*
|
||||||
* @return The NBT compound.
|
* @return The NBT compound.
|
||||||
*/
|
*/
|
||||||
public static NbtCompound createCompound() {
|
public static NbtCompound createCompound() {
|
||||||
@ -497,8 +497,6 @@ public class NbtFactory {
|
|||||||
/**
|
/**
|
||||||
* Set the NBT compound tag of a given item stack.
|
* Set the NBT compound tag of a given item stack.
|
||||||
* <p>
|
* <p>
|
||||||
* The item stack must be a wrapper for a CraftItemStack. Use
|
|
||||||
* {@link MinecraftReflection#getBukkitItemStack(ItemStack)} if not.
|
|
||||||
* @param stack - the item stack, cannot be air.
|
* @param stack - the item stack, cannot be air.
|
||||||
* @param compound - the new NBT compound, or NULL to remove it.
|
* @param compound - the new NBT compound, or NULL to remove it.
|
||||||
* @throws IllegalArgumentException If the stack is not a CraftItemStack, or it represents air.
|
* @throws IllegalArgumentException If the stack is not a CraftItemStack, or it represents air.
|
||||||
@ -572,7 +570,6 @@ public class NbtFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert wrapped List and Map objects into their respective NBT counterparts.
|
* Convert wrapped List and Map objects into their respective NBT counterparts.
|
||||||
* @param name - the name of the NBT element to create.
|
|
||||||
* @param value - the value of the element to create. Can be a List or a Map.
|
* @param value - the value of the element to create. Can be a List or a Map.
|
||||||
* @return The NBT element.
|
* @return The NBT element.
|
||||||
*/
|
*/
|
||||||
|
@ -479,7 +479,7 @@ public abstract class SchematicHandler {
|
|||||||
/**
|
/**
|
||||||
* Get a schematic
|
* Get a schematic
|
||||||
*
|
*
|
||||||
* @param name to check
|
* @param file to check
|
||||||
*
|
*
|
||||||
* @return schematic if found, else null
|
* @return schematic if found, else null
|
||||||
*/
|
*/
|
||||||
@ -726,6 +726,7 @@ public abstract class SchematicHandler {
|
|||||||
/**
|
/**
|
||||||
* Schematic Class
|
* Schematic Class
|
||||||
*
|
*
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public class Schematic {
|
public class Schematic {
|
||||||
// Lossy but fast
|
// Lossy but fast
|
||||||
@ -744,7 +745,6 @@ public abstract class SchematicHandler {
|
|||||||
* -
|
* -
|
||||||
* @param blockCollection
|
* @param blockCollection
|
||||||
* @param schematicDimension
|
* @param schematicDimension
|
||||||
* @param file
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Schematic(final DataCollection[] blockCollection, final Dimension schematicDimension) {
|
public Schematic(final DataCollection[] blockCollection, final Dimension schematicDimension) {
|
||||||
@ -878,6 +878,7 @@ public abstract class SchematicHandler {
|
|||||||
/**
|
/**
|
||||||
* Schematic Dimensions
|
* Schematic Dimensions
|
||||||
*
|
*
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public static class Dimension {
|
public static class Dimension {
|
||||||
private final int x;
|
private final int x;
|
||||||
@ -906,6 +907,7 @@ public abstract class SchematicHandler {
|
|||||||
/**
|
/**
|
||||||
* Schematic Data Collection
|
* Schematic Data Collection
|
||||||
* @deprecated as it is slow to wrap each block
|
* @deprecated as it is slow to wrap each block
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class DataCollection {
|
public class DataCollection {
|
||||||
|
@ -36,7 +36,7 @@ public abstract class UUIDHandlerImplementation {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If the UUID is not found, some commands can request to fetch the UUID when possible
|
* If the UUID is not found, some commands can request to fetch the UUID when possible
|
||||||
* @param player
|
* @param name
|
||||||
* @param ifFetch
|
* @param ifFetch
|
||||||
*/
|
*/
|
||||||
public abstract void fetchUUID(final String name, final RunnableVal<UUID> ifFetch);
|
public abstract void fetchUUID(final String name, final RunnableVal<UUID> ifFetch);
|
||||||
|
@ -42,7 +42,7 @@ import com.intellectualcrafters.configuration.serialization.ConfigurationSeriali
|
|||||||
* <p>
|
* <p>
|
||||||
* This class follows the builder pattern, allowing for method chaining.
|
* This class follows the builder pattern, allowing for method chaining.
|
||||||
* It is set up such that invocations of property-setting methods will affect the current editing component,
|
* It is set up such that invocations of property-setting methods will affect the current editing component,
|
||||||
* and a call to {@link #then()} or {@link #then(Object)} will append a new editing component to the end of the message,
|
* and a call to {@link #then(String)} or {@link #text(TextualComponent)} will append a new editing component to the end of the message,
|
||||||
* optionally initializing it with text. Further property-setting method calls will affect that editing component.
|
* optionally initializing it with text. Further property-setting method calls will affect that editing component.
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
|
@ -30,6 +30,8 @@ import com.intellectualcrafters.plot.object.PlotCluster;
|
|||||||
/**
|
/**
|
||||||
* Called when a flag is removed from a plot
|
* Called when a flag is removed from a plot
|
||||||
*
|
*
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public class ClusterFlagRemoveEvent extends Event implements Cancellable {
|
public class ClusterFlagRemoveEvent extends Event implements Cancellable {
|
||||||
private static HandlerList handlers = new HandlerList();
|
private static HandlerList handlers = new HandlerList();
|
||||||
@ -41,7 +43,7 @@ public class ClusterFlagRemoveEvent extends Event implements Cancellable {
|
|||||||
* PlotFlagRemoveEvent: Called when a flag is removed from a plot
|
* PlotFlagRemoveEvent: Called when a flag is removed from a plot
|
||||||
*
|
*
|
||||||
* @param flag Flag that was removed
|
* @param flag Flag that was removed
|
||||||
* @param plot Plot from which the flag was removed
|
* @param cluster PlotCluster from which the flag was removed
|
||||||
*/
|
*/
|
||||||
public ClusterFlagRemoveEvent(final Flag flag, final PlotCluster cluster) {
|
public ClusterFlagRemoveEvent(final Flag flag, final PlotCluster cluster) {
|
||||||
this.cluster = cluster;
|
this.cluster = cluster;
|
||||||
|
@ -223,7 +223,6 @@ public abstract class BukkitPlotGenerator extends ChunkGenerator {
|
|||||||
* @param cz
|
* @param cz
|
||||||
* @param requiredRegion
|
* @param requiredRegion
|
||||||
* @param biomes
|
* @param biomes
|
||||||
* @param result
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public abstract void generateChunk(final World world, final RegionWrapper requiredRegion, final PseudoRandom random, final int cx, final int cz, final BiomeGrid biomes);
|
public abstract void generateChunk(final World world, final RegionWrapper requiredRegion, final PseudoRandom random, final int cx, final int cz, final BiomeGrid biomes);
|
||||||
|
@ -4,14 +4,14 @@ import org.spongepowered.api.block.BlockState;
|
|||||||
import org.spongepowered.api.world.World;
|
import org.spongepowered.api.world.World;
|
||||||
import org.spongepowered.api.world.extent.ImmutableBiomeArea;
|
import org.spongepowered.api.world.extent.ImmutableBiomeArea;
|
||||||
import org.spongepowered.api.world.extent.MutableBlockVolume;
|
import org.spongepowered.api.world.extent.MutableBlockVolume;
|
||||||
import org.spongepowered.api.world.gen.GeneratorPopulator;
|
import org.spongepowered.api.world.gen.GenerationPopulator;
|
||||||
|
|
||||||
import com.flowpowered.math.vector.Vector3i;
|
import com.flowpowered.math.vector.Vector3i;
|
||||||
import com.intellectualcrafters.plot.object.PseudoRandom;
|
import com.intellectualcrafters.plot.object.PseudoRandom;
|
||||||
import com.intellectualcrafters.plot.object.RegionWrapper;
|
import com.intellectualcrafters.plot.object.RegionWrapper;
|
||||||
import com.intellectualcrafters.plot.util.ChunkManager;
|
import com.intellectualcrafters.plot.util.ChunkManager;
|
||||||
|
|
||||||
public abstract class SpongePlotPopulator<T extends SpongePlotGenerator> implements GeneratorPopulator {
|
public abstract class SpongePlotPopulator<T extends SpongePlotGenerator> implements GenerationPopulator {
|
||||||
|
|
||||||
public int X;
|
public int X;
|
||||||
public int Z;
|
public int Z;
|
||||||
@ -54,7 +54,7 @@ public abstract class SpongePlotPopulator<T extends SpongePlotGenerator> impleme
|
|||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
public abstract void populate(final World world, final RegionWrapper requiredRegion, final PseudoRandom random, final int cx, final int cz);
|
public abstract void populate(final World world, final RegionWrapper requiredRegion, final PseudoRandom random, final int cx, final int cz);
|
||||||
|
|
||||||
@ -63,8 +63,7 @@ public abstract class SpongePlotPopulator<T extends SpongePlotGenerator> impleme
|
|||||||
* @param x
|
* @param x
|
||||||
* @param y
|
* @param y
|
||||||
* @param z
|
* @param z
|
||||||
* @param id
|
* @param state
|
||||||
* @param data
|
|
||||||
*/
|
*/
|
||||||
public void setBlock(final int x, final int y, final int z, final BlockState state) {
|
public void setBlock(final int x, final int y, final int z, final BlockState state) {
|
||||||
buffer.setBlock(X + x, y, Z + z, state);
|
buffer.setBlock(X + x, y, Z + z, state);
|
||||||
|
Loading…
Reference in New Issue
Block a user