public class PlotAPI
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADMIN_PERMISSION
Admin Permission
|
Constructor and Description |
---|
PlotAPI(org.bukkit.plugin.java.JavaPlugin plugin)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFlag(AbstractFlag flag)
Register a flag for use in plots
|
void |
addPlotWorld(java.lang.String world,
PlotWorld plotWorld,
PlotManager manager)
Add a plotoworld
|
int |
getAllowedPlots(org.bukkit.entity.Player player)
Get the allowed plot count for a player
|
java.util.Set<Plot>
|
getAllPlots()
Get all plots
|
org.bukkit.Location |
getBottomLocation(Plot p)
Get Bottom Location
|
C |
getCaptions()
C class contains all the captions from the translations.yml file.
|
org.bukkit.configuration.file.YamlConfiguration |
getConfig()
|
FlagManager |
getFlagManager()
FlagManager class contains methods relating to plot flags
|
AbstractFlag[] |
getFlags()
get all the currently registered flags
|
org.bukkit.Location |
getHomeLocation(Plot p)
Get home location
|
org.bukkit.Location[] |
getLocations(Plot p)
Get plot locations
|
PlotMain |
getMain()
Get the main class for this plugin
- Contains a lot of fields and methods - not very well organized Only use this if you really need it |
PlayerFunctions |
getPlayerFunctions()
PlayerFunctions class contains useful methods relating to players - Some
player/plot methods are here as well
|
int |
getPlayerPlotCount(org.bukkit.World world,
org.bukkit.entity.Player player)
Get the player plot count
|
java.util.Set<Plot>
|
getPlayerPlots(org.bukkit.entity.Player player)
Return all plots for a player
|
java.util.Set<Plot>
|
getPlayerPlots(org.bukkit.World world,
org.bukkit.entity.Player player)
Get a players plots
|
Plot |
getPlot(org.bukkit.Location l)
Get a plot based on the location
|
Plot |
getPlot(org.bukkit.entity.Player player)
Get a plot based on the player location
|
Plot |
getPlot(org.bukkit.World world,
int x,
int z)
Get a plot based on the ID
|
PlotHelper |
getPlotHelper()
PlotHelper class contains useful methods relating to plots.
|
PlotMain |
getPlotMain()
Get the plotMain class
|
PlotManager |
getPlotManager(java.lang.String world)
Get the plot manager for a world. - Contains useful low level methods for
plot merging, clearing, and tessellation
|
PlotManager |
getPlotManager(org.bukkit.World world)
Get the plot manager for a world. - Most of these methods can be accessed
through the PlotHelper
|
Plot[] |
getPlots(org.bukkit.World world)
Get all plots for the world
|
Plot[] |
getPlots(org.bukkit.World world,
org.bukkit.entity.Player plr,
boolean just_owner)
Get all plots for the player
|
java.lang.String[] |
getPlotWorlds()
Get all plot worlds
|
SchematicHandler |
getSchematicHandler()
SchematicHandler class contains methods related to pasting schematics
|
org.bukkit.configuration.file.YamlConfiguration |
getStorage()
|
org.bukkit.Location |
getTopLocation(Plot p)
Get Top Location
|
PlotWorld |
getWorldSettings(java.lang.String world)
Get the settings for a world (settings bundled in PlotWorld class)
|
PlotWorld |
getWorldSettings(org.bukkit.World world)
Get the settings for a world (settings bundled in PlotWorld class) - You
will need to downcast for the specific settings a Generator has. e.g.
|
boolean |
hasPlot(org.bukkit.World world,
org.bukkit.entity.Player player)
Check whether or not a player has a plot
|
boolean |
isInPlot(org.bukkit.entity.Player player)
Check whether or not a player is in a plot
|
boolean |
isPlotWorld(org.bukkit.World world)
Get if plot world
|
void |
registerCommand(SubCommand c)
Register a subcommand
|
void |
sendConsoleMessage(C c)
Send a message to the console
|
void |
sendConsoleMessage(java.lang.String msg)
Send a message to the console. - Supports color codes
|
void |
sendMessage(org.bukkit.entity.Player player,
C c)
Send a message to a player.
|
void |
sendMessage(org.bukkit.entity.Player player,
java.lang.String string)
Send a message to a player. - Supports color codes
|
public static final java.lang.String ADMIN_PERMISSION
public PlotAPI(org.bukkit.plugin.java.JavaPlugin plugin)
plugin
- Plugin used to access this methodpublic java.util.Set<Plot> getAllPlots()
public java.util.Set<Plot> getPlayerPlots(org.bukkit.entity.Player player)
player
-public void addPlotWorld(java.lang.String world, PlotWorld plotWorld, PlotManager manager)
world
- World NameplotWorld
- Plot World Objectmanager
- World ManagerPlotMain.addPlotWorld(String,
com.intellectualcrafters.plot.object.PlotWorld,
com.intellectualcrafters.plot.object.PlotManager)
public org.bukkit.configuration.file.YamlConfiguration getConfig()
PlotMain.config
public org.bukkit.configuration.file.YamlConfiguration getStorage()
PlotMain.storage
public PlotMain getMain()
public PlotHelper getPlotHelper()
public PlayerFunctions getPlayerFunctions()
public FlagManager getFlagManager()
public SchematicHandler getSchematicHandler()
public C getCaptions()
public PlotManager getPlotManager(org.bukkit.World world)
world
-public PlotManager getPlotManager(java.lang.String world)
world
-public PlotWorld getWorldSettings(org.bukkit.World world)
world
- (to get settings of)public PlotWorld getWorldSettings(java.lang.String world)
world
- (to get settings of)public void sendMessage(org.bukkit.entity.Player player, C c)
player
-c
- (Caption)public void sendMessage(org.bukkit.entity.Player player, java.lang.String string)
player
-string
-public void sendConsoleMessage(java.lang.String msg)
msg
-public void sendConsoleMessage(C c)
c
- (Caption)public void addFlag(AbstractFlag flag)
flag
-public AbstractFlag[] getFlags()
public Plot getPlot(org.bukkit.World world, int x, int z)
world
-x
-z
-public Plot getPlot(org.bukkit.Location l)
l
-public Plot getPlot(org.bukkit.entity.Player player)
player
-public boolean hasPlot(org.bukkit.World world, org.bukkit.entity.Player player)
player
-public Plot[] getPlots(org.bukkit.World world, org.bukkit.entity.Player plr, boolean just_owner)
plr
- to search forjust_owner
- should we just search for owner? Or with rights?public Plot[] getPlots(org.bukkit.World world)
world
- to get plots ofpublic java.lang.String[] getPlotWorlds()
public boolean isPlotWorld(org.bukkit.World world)
world
- (to check if plot world)public org.bukkit.Location[] getLocations(Plot p)
p
-public org.bukkit.Location getHomeLocation(Plot p)
p
-public org.bukkit.Location getBottomLocation(Plot p)
p
-public org.bukkit.Location getTopLocation(Plot p)
p
-public boolean isInPlot(org.bukkit.entity.Player player)
player
-public void registerCommand(SubCommand c)
c
-public PlotMain getPlotMain()
public int getPlayerPlotCount(org.bukkit.World world, org.bukkit.entity.Player player)
player
-public java.util.Set<Plot> getPlayerPlots(org.bukkit.World world, org.bukkit.entity.Player player)
player
-public int getAllowedPlots(org.bukkit.entity.Player player)
player
-