mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Updated API JDocs
This commit is contained in:
parent
947ad1446f
commit
ad60cb4f4a
@ -62,18 +62,27 @@ public class PlotMain extends JavaPlugin {
|
|||||||
* settings.properties
|
* settings.properties
|
||||||
*/
|
*/
|
||||||
public static File configFile;
|
public static File configFile;
|
||||||
|
/**
|
||||||
|
* The main configuration file
|
||||||
|
*/
|
||||||
public static YamlConfiguration config;
|
public static YamlConfiguration config;
|
||||||
private static int config_ver = 1;
|
private static int config_ver = 1;
|
||||||
/**
|
/**
|
||||||
* storage.properties
|
* storage.properties
|
||||||
*/
|
*/
|
||||||
public static File storageFile;
|
public static File storageFile;
|
||||||
|
/**
|
||||||
|
* Contains storage options
|
||||||
|
*/
|
||||||
public static YamlConfiguration storage;
|
public static YamlConfiguration storage;
|
||||||
public static int storage_ver = 1;
|
public static int storage_ver = 1;
|
||||||
/**
|
/**
|
||||||
* translations.properties
|
* translations.properties
|
||||||
*/
|
*/
|
||||||
public static File translationsFile;
|
public static File translationsFile;
|
||||||
|
/**
|
||||||
|
* Contains all translations
|
||||||
|
*/
|
||||||
public static YamlConfiguration translations;
|
public static YamlConfiguration translations;
|
||||||
public static int translations_ver = 1;
|
public static int translations_ver = 1;
|
||||||
/**
|
/**
|
||||||
|
@ -8,28 +8,18 @@
|
|||||||
|
|
||||||
package com.intellectualcrafters.plot.api;
|
package com.intellectualcrafters.plot.api;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.intellectualcrafters.plot.*;
|
||||||
import java.util.Set;
|
import com.intellectualcrafters.plot.commands.MainCommand;
|
||||||
|
import com.intellectualcrafters.plot.commands.SubCommand;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import com.intellectualcrafters.plot.AbstractFlag;
|
import java.util.ArrayList;
|
||||||
import com.intellectualcrafters.plot.C;
|
import java.util.Set;
|
||||||
import com.intellectualcrafters.plot.FlagManager;
|
|
||||||
import com.intellectualcrafters.plot.PlayerFunctions;
|
|
||||||
import com.intellectualcrafters.plot.Plot;
|
|
||||||
import com.intellectualcrafters.plot.PlotHelper;
|
|
||||||
import com.intellectualcrafters.plot.PlotId;
|
|
||||||
import com.intellectualcrafters.plot.PlotMain;
|
|
||||||
import com.intellectualcrafters.plot.PlotManager;
|
|
||||||
import com.intellectualcrafters.plot.PlotWorld;
|
|
||||||
import com.intellectualcrafters.plot.SchematicHandler;
|
|
||||||
import com.intellectualcrafters.plot.commands.MainCommand;
|
|
||||||
import com.intellectualcrafters.plot.commands.SubCommand;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The plotMain api class.
|
* The plotMain api class.
|
||||||
@ -47,16 +37,10 @@ public class PlotAPI {
|
|||||||
|
|
||||||
// Methods/fields in PlotMain class
|
// Methods/fields in PlotMain class
|
||||||
|
|
||||||
// PlotMain.config;
|
// PlotMain.checkForExpiredPlots(); #Ignore
|
||||||
// PlotMain.storage
|
// PlotMain.killAllEntities(); #Ignore
|
||||||
// PlotMain.translations
|
|
||||||
// PlotMain.addPlotWorld(world, plotworld, manager);
|
|
||||||
//
|
|
||||||
// PlotMain.checkForExpiredPlots();
|
|
||||||
// PlotMain.killAllEntities();
|
|
||||||
//
|
//
|
||||||
// PlotMain.createConfiguration(plotworld);
|
// PlotMain.createConfiguration(plotworld);
|
||||||
// PlotMain.getPlots()
|
|
||||||
// PlotMain.getPlots(player)
|
// PlotMain.getPlots(player)
|
||||||
// PlotMain.getPlots(world)
|
// PlotMain.getPlots(world)
|
||||||
// PlotMain.getPlots(world, player)
|
// PlotMain.getPlots(world, player)
|
||||||
@ -69,13 +53,69 @@ public class PlotAPI {
|
|||||||
|
|
||||||
// To access plotMain stuff.
|
// To access plotMain stuff.
|
||||||
private PlotMain plotMain;
|
private PlotMain plotMain;
|
||||||
|
|
||||||
// Reference
|
// Reference
|
||||||
|
/**
|
||||||
|
* Admin Permission
|
||||||
|
*/
|
||||||
public static final String ADMIN_PERMISSION = "plots.admin";
|
public static final String ADMIN_PERMISSION = "plots.admin";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all plots
|
||||||
|
* @return all plots
|
||||||
|
*/
|
||||||
|
public Set<Plot> getAllPlots() {
|
||||||
|
return PlotMain.getPlots();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return all plots for a player
|
||||||
|
* @param player
|
||||||
|
* @return all plots that a player owns
|
||||||
|
*/
|
||||||
|
public Set<Plot> getPlayerPlots(Player player) {
|
||||||
|
return PlotMain.getPlots(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a plotoworld
|
||||||
|
* @see com.intellectualcrafters.plot.PlotMain#addPlotWorld(String, com.intellectualcrafters.plot.PlotWorld, com.intellectualcrafters.plot.PlotManager)
|
||||||
|
* @param world World Name
|
||||||
|
* @param plotWorld Plot World Object
|
||||||
|
* @param manager World Manager
|
||||||
|
*/
|
||||||
|
public void addPlotWorld(String world, PlotWorld plotWorld, PlotManager manager) {
|
||||||
|
PlotMain.addPlotWorld(world, plotWorld, manager);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see com.intellectualcrafters.plot.PlotMain#config
|
||||||
|
* @return main configuration
|
||||||
|
*/
|
||||||
|
public YamlConfiguration getConfig() {
|
||||||
|
return PlotMain.config;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see com.intellectualcrafters.plot.PlotMain#translations
|
||||||
|
* @return translation configuration
|
||||||
|
*/
|
||||||
|
public YamlConfiguration getTranslations() {
|
||||||
|
return PlotMain.translations;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see com.intellectualcrafters.plot.PlotMain#storage
|
||||||
|
* @return storage configuration
|
||||||
|
*/
|
||||||
|
public YamlConfiguration getStorage() {
|
||||||
|
return PlotMain.storage;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor. Insert any Plugin.
|
* Constructor. Insert any Plugin.
|
||||||
*
|
* (Optimally the plugin that is accessing the method)
|
||||||
* @param plugin
|
* @param plugin Plugin used to access this method
|
||||||
*/
|
*/
|
||||||
public PlotAPI(JavaPlugin plugin) {
|
public PlotAPI(JavaPlugin plugin) {
|
||||||
this.plotMain = JavaPlugin.getPlugin(PlotMain.class);
|
this.plotMain = JavaPlugin.getPlugin(PlotMain.class);
|
||||||
@ -84,8 +124,9 @@ public class PlotAPI {
|
|||||||
/**
|
/**
|
||||||
* Get the main class for this plugin <br>
|
* Get the main class for this plugin <br>
|
||||||
* - Contains a lot of fields and methods - not very well organized
|
* - Contains a lot of fields and methods - not very well organized
|
||||||
*
|
* <br>
|
||||||
* @return
|
* Only use this if you really need it
|
||||||
|
* @return PlotMain PlotSquared Main Class
|
||||||
*/
|
*/
|
||||||
public PlotMain getMain() {
|
public PlotMain getMain() {
|
||||||
return plotMain;
|
return plotMain;
|
||||||
@ -94,7 +135,7 @@ public class PlotAPI {
|
|||||||
/**
|
/**
|
||||||
* PlotHelper class contains useful methods relating to plots.
|
* PlotHelper class contains useful methods relating to plots.
|
||||||
*
|
*
|
||||||
* @return
|
* @return PlotHelper
|
||||||
*/
|
*/
|
||||||
public PlotHelper getPlotHelper() {
|
public PlotHelper getPlotHelper() {
|
||||||
return plotHelper;
|
return plotHelper;
|
||||||
@ -104,7 +145,7 @@ public class PlotAPI {
|
|||||||
* PlayerFunctions class contains useful methods relating to players - Some
|
* PlayerFunctions class contains useful methods relating to players - Some
|
||||||
* player/plot methods are here as well
|
* player/plot methods are here as well
|
||||||
*
|
*
|
||||||
* @return
|
* @return PlayerFunctions
|
||||||
*/
|
*/
|
||||||
public PlayerFunctions getPlayerFunctions() {
|
public PlayerFunctions getPlayerFunctions() {
|
||||||
return playerFunctions;
|
return playerFunctions;
|
||||||
@ -113,7 +154,7 @@ public class PlotAPI {
|
|||||||
/**
|
/**
|
||||||
* FlagManager class contains methods relating to plot flags
|
* FlagManager class contains methods relating to plot flags
|
||||||
*
|
*
|
||||||
* @return
|
* @return FlagManager
|
||||||
*/
|
*/
|
||||||
public FlagManager getFlagManager() {
|
public FlagManager getFlagManager() {
|
||||||
return flagManager;
|
return flagManager;
|
||||||
@ -122,7 +163,7 @@ public class PlotAPI {
|
|||||||
/**
|
/**
|
||||||
* SchematicHandler class contains methods related to pasting schematics
|
* SchematicHandler class contains methods related to pasting schematics
|
||||||
*
|
*
|
||||||
* @return
|
* @return SchematicHandler
|
||||||
*/
|
*/
|
||||||
public SchematicHandler getSchematicHandler() {
|
public SchematicHandler getSchematicHandler() {
|
||||||
return schematicHandler;
|
return schematicHandler;
|
||||||
@ -131,7 +172,7 @@ public class PlotAPI {
|
|||||||
/**
|
/**
|
||||||
* C class contains all the captions from the translations.yml file.
|
* C class contains all the captions from the translations.yml file.
|
||||||
*
|
*
|
||||||
* @return
|
* @return C
|
||||||
*/
|
*/
|
||||||
public C getCaptions() {
|
public C getCaptions() {
|
||||||
return c;
|
return c;
|
||||||
@ -142,7 +183,7 @@ public class PlotAPI {
|
|||||||
* through the PlotHelper
|
* through the PlotHelper
|
||||||
*
|
*
|
||||||
* @param world
|
* @param world
|
||||||
* @return
|
* @return PlotManager
|
||||||
*/
|
*/
|
||||||
public PlotManager getPlotManager(World world) {
|
public PlotManager getPlotManager(World world) {
|
||||||
return PlotMain.getPlotManager(world);
|
return PlotMain.getPlotManager(world);
|
||||||
@ -153,7 +194,7 @@ public class PlotAPI {
|
|||||||
* plot merging, clearing, and tessellation
|
* plot merging, clearing, and tessellation
|
||||||
*
|
*
|
||||||
* @param world
|
* @param world
|
||||||
* @return
|
* @return PlotManager
|
||||||
*/
|
*/
|
||||||
public PlotManager getPlotManager(String world) {
|
public PlotManager getPlotManager(String world) {
|
||||||
return PlotMain.getPlotManager(world);
|
return PlotMain.getPlotManager(world);
|
||||||
|
Loading…
Reference in New Issue
Block a user