Package com.plotsquared.core
Class PlotAPI
java.lang.Object
com.plotsquared.core.PlotAPI
PlotSquared API.
Useful classes:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPlotArea
(@NonNull PlotArea plotArea) Adds a plot world.Gets all plots.Gets the block/biome set queueChunkManager class contains several useful methods.getPlayerPlots
(@NonNull PlotPlayer<?> player) Gets all plots for a player.getPlotAreas
(@Nullable String world) Gets a list of PlotAreas in the world.Gets the PlotSquared class.SchematicHandler class contains methods related to pasting, reading and writing schematics.void
registerListener
(@NonNull Object listener) Registers a listener for PlotSquared Eventsvoid
sendConsoleMessage
(@NonNull Caption caption, @NonNull net.kyori.adventure.text.minimessage.Template @NonNull ... replacements) Sends a message to the console.void
sendConsoleMessage
(@NonNull String message, @NonNull net.kyori.adventure.text.minimessage.Template @NonNull ... replacements) Send a message to the console.wrapPlayer
(@NonNull String player) Gets the PlotPlayer for a username.wrapPlayer
(@NonNull UUID uuid) Gets the PlotPlayer for a UUID.
-
Constructor Details
-
PlotAPI
public PlotAPI()
-
-
Method Details
-
getAllPlots
Gets all plots.- Returns:
- all plots
-
getPlayerPlots
Gets all plots for a player.- Parameters:
player
- Player, whose plots to search for- Returns:
- all plots that a player owns
-
addPlotArea
Adds a plot world.- Parameters:
plotArea
- Plot World Object- See Also:
-
getChunkManager
ChunkManager class contains several useful methods.- Chunk deletion
- Moving or copying regions
- Plot swapping
- Entity Tracking
- Region Regeneration
- Returns:
- ChunkManager
- See Also:
-
getBlockQueue
Gets the block/biome set queue- Returns:
- GlobalBlockQueue.IMP
-
getSchematicHandler
SchematicHandler class contains methods related to pasting, reading and writing schematics.- Returns:
- SchematicHandler
- See Also:
-
getPlotAreas
Gets a list of PlotAreas in the world.- Parameters:
world
- The world to check for plot areas- Returns:
- A set of PlotAreas
-
sendConsoleMessage
public void sendConsoleMessage(@NonNull String message, @NonNull net.kyori.adventure.text.minimessage.Template @NonNull ... replacements) Send a message to the console. The message supports color codes.- Parameters:
message
- the messagereplacements
- Variable replacements
-
sendConsoleMessage
public void sendConsoleMessage(@NonNull Caption caption, @NonNull net.kyori.adventure.text.minimessage.Template @NonNull ... replacements) Sends a message to the console.- Parameters:
caption
- the messagereplacements
- Variable replacements
-
getPlotSquared
Gets the PlotSquared class.- Returns:
- PlotSquared Class
- See Also:
-
wrapPlayer
Gets the PlotPlayer for a UUID.Please note that PlotSquared can be configured to provide different UUIDs than Bukkit
- Parameters:
uuid
- the uuid of the player to wrap- Returns:
- a
PlotPlayer
-
wrapPlayer
Gets the PlotPlayer for a username.- Parameters:
player
- the player to wrap- Returns:
- a
PlotPlayer
-
registerListener
Registers a listener for PlotSquared Events- Parameters:
listener
- the listener class to register- See Also:
-