From d87de11378135c02fe7288c02cbb8413f9b996a1 Mon Sep 17 00:00:00 2001 From: sauilitired Date: Fri, 3 Jul 2015 12:10:50 +0200 Subject: [PATCH] Deprecate the API --- .../plot/PlotSquared.java | 2 + .../plot/PlotSquaredMain.java | 90 +++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java index 193ee9086..d7b3c8da4 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java @@ -33,6 +33,8 @@ import java.util.zip.ZipInputStream; /** * An implementation of the core, * with a static getter for easy access + * + * @see com.intellectualcrafters.plot.PlotSquaredMain Structure */ public class PlotSquared implements PlotSquaredMain { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquaredMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquaredMain.java index 868c779ec..159808f25 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquaredMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquaredMain.java @@ -53,33 +53,123 @@ public interface PlotSquaredMain { Set getPlots(PlotPlayer player); + /** + * Get all plots belonging to a specified + * player UUID + * + * @param uuid Player UUID + * @return A set containing the plots + * @see #getPlots(PlotPlayer) Using PlotPlayer rather than UUID + * @see #getPlots(String, UUID) To limit the search to a specific world + * @see #getPlots(String, String) To limit the search to a specific world, and use player names + */ Set getPlots(UUID uuid); + /** + * Remove a plot from the specified plot world + * + * @param world World Name + * @param id Plot ID + * @param callEvent If the plot delete event should be called + * @return true on success | false on failure + */ boolean removePlot(String world, PlotId id, boolean callEvent); + /** + * Load a world + * + * @param world World Name + * @param generator PlotGenerator Implementation + */ void loadWorld(String world, PlotGenerator generator); + /** + * Setup a PlotWorld + * + * @param world World Name + * @param id World ID + * @return true on success | false on failure + */ boolean setupPlotWorld(String world, String id); + /** + * Get the database connection + * + * @see #getDatabase() Get the database implementation + * @return Database connection + */ Connection getConnection(); + /** + * Copy a file into the specified folder + * + * @param file File to copy + * @param folder Folder to copy to + */ void copyFile(String file, String folder); + /** + * Disable the PlotSquared core + */ void disable(); + /** + * Setup the database configuration file + */ void setupDatabase(); + /** + * Setup the default flags + */ void setupDefaultFlags(); + /** + * Setup the global configuration file + */ void setupConfig(); + /** + * Setup all configuration classes + * + * @see #setupDatabase() Setup the database configuration file + * @see #setupConfig() Setup the general configuration file + * @see #setupDefaultFlags() Setup the default flags + */ void setupConfigs(); void showDebug(); + /** + * Get the current java version as + * a double + * @code { + * 1.7 = Java 7 + * 1.8 = Java 8 + * etc... + * } + * + * @return Java version as a double + */ double getJavaVersion(); + /** + * Get a set containing the names of + * all PlotWorlds + * + * @see #getPlotWorldObjects() To get the actual objects + * + * @return A set containing the names of all PlotWorlds + */ Set getPlotWorlds(); + /** + * Get a collection containing the + * PlotWorld objects + * + * @see #getPlotWorlds() To get the names of the worlds + * @see PlotWorld The returned object + * + * @return Collection containing PlotWorld's + */ Collection getPlotWorldObjects(); }