Interface PublicAPI
public interface PublicAPI
Main interface for external plugins to interact with ScalaPlot.
This class provides methods to retrieve, manage, and interact with plots.
-
Method Summary
Modifier and TypeMethodDescriptionvoidBans a player from a specific plot.booleancanBeClaimed(IPlot plot) Checks if a plot is currently available to be claimed.claimPlot(org.bukkit.entity.Player player) Claims a plot for the player.deletePlot(org.bukkit.entity.Player player, IPlot plot) Deletes a specific plot, resetting blocks and metadata.Gets all plots in the system.doublegetAverageRating(IPlot plot) Gets the average rating of a specific plot.getBannedPlayers(IPlot plot) Gets all banned players on a specific plot.getPlotAt(org.bukkit.Location location) Gets the plot at a specific location.getPlotById(PlotId id) Gets a plot by its specific ID.org.bukkit.LocationgetPlotCenter(IPlot plot) Gets the center of a specific plot.intgetPlotCount(UUID playerId) Gets the total number of plots owned by a specific player.getPlotOwner(IPlot plot) Gets the owner of a specific plot.getPlotsByOwner(UUID ownerId) Gets all plots owned by a specific player.getTruestedPlayers(IPlot plot) Gets all trusted players on a specific plot.booleanChecks if a player is banned from a specific plot.booleanChecks if a player is trusted on a specific plot.voidResets a specific plot's metadata to default values.voidtrustPlayer(IPlot plot, UUID playerId) Trusts a player on a specific plot.voidunbanPlayer(IPlot plot, UUID playerId) Unbans a player from a specific plot.voiduntrustPlayer(IPlot plot, UUID playerId) Untrusts a player from a specific plot.
-
Method Details
-
getPlotAt
-
getPlotsByOwner
-
getPlotById
-
getPlotCount
-
getAllPlots
-
isTrusted
-
isBanned
-
banPlayer
-
unbanPlayer
-
getPlotOwner
-
getPlotCenter
Gets the center of a specific plot.- Parameters:
plot- The plot to check.- Returns:
- The center
Locationof the plot.
-
trustPlayer
-
untrustPlayer
-
getTruestedPlayers
-
getBannedPlayers
-
claimPlot
Claims a plot for the player.- Parameters:
player- ThePlayerwho wants to claim a plot.- Returns:
- The
ClaimResultof the claim attempt.
-
resetPlot
Resets a specific plot's metadata to default values.- Parameters:
plot- The plot to reset.
-
deletePlot
Deletes a specific plot, resetting blocks and metadata.- Parameters:
player- The player initiating the deletion.plot- The plot to delete.- Returns:
- A
CompletableFuturewith thePlotResetResult.
-
canBeClaimed
Checks if a plot is currently available to be claimed.- Parameters:
plot- The plot to check.- Returns:
- true if available.
-
getAverageRating
Gets the average rating of a specific plot.- Parameters:
plot- The plot to check.- Returns:
- A double between 0.0 and 5.0.
-