Skip to content

PublicAPI: Methods

com.scala.plotAPI.PublicAPI is the main interface exposed by ScalaPlot. It’s implemented by the plugin’s main class, obtainable via Bukkit.getPluginManager().getPlugin("Plot").

IPlot getPlotAt(Location location);
List<IPlot> getPlotsByOwner(UUID ownerId);
IPlot getPlotById(PlotId id);
IPlot getPlotById(String world, PlotId id);
int getPlotCount(UUID playerId);
Collection<IPlot> getAllPlots();
boolean canBeClaimed(IPlot plot);
UUID getPlotOwner(IPlot plot);
Location getPlotCenter(IPlot plot);
Method Description
getPlotAt(location) Returns the plot at the given location, or null if not inside any plot
getPlotsByOwner(ownerId) All plots owned by a player
getPlotById(id) / getPlotById(world, id) Plot by ID, optionally within a specific world
getPlotCount(playerId) Total number of plots owned by a player
getAllPlots() All plots known to the system
canBeClaimed(plot) true if the plot is currently free and claimable
getPlotOwner(plot) Owner’s UUID, or null if unclaimed
getPlotCenter(plot) Center location of the plot
boolean isTrusted(IPlot plot, UUID playerId);
boolean isBanned(IPlot plot, UUID playerId);
void trustPlayer(IPlot plot, UUID playerId);
void untrustPlayer(IPlot plot, UUID playerId);
void banPlayer(IPlot plot, UUID playerId);
void unbanPlayer(IPlot plot, UUID playerId);
Set<UUID> getTruestedPlayers(IPlot plot);
Set<UUID> getBannedPlayers(IPlot plot);
ClaimResult claimPlot(Player player);
void resetPlot(IPlot plot);
CompletableFuture<PlotResetResult> deletePlot(Player player, IPlot plot);
  • claimPlot(player) attempts to claim the nearest plot for the player and returns a ClaimResult describing the outcome.
  • resetPlot(plot) restores the plot’s metadata to default values.
  • deletePlot(player, plot) deletes the plot asynchronously, returning a CompletableFuture<PlotResetResult> to be handled with .thenAccept(...).
double getAverageRating(IPlot plot);
ReportStatus getStatus(IPlot plot);
void setStatus(IPlot plot, ReportStatus status);
UUID getReporterUUID(IPlot plot);
void setReporterUUID(IPlot plot, UUID reporterUUID);

getAverageRating returns a value between 0.0 and 5.0.

boolean isPremium();
boolean getBBB();
int getMaxOwnablePlots();
org.bukkit.plugin.java.JavaPlugin getPlugin();
IConfigAPI getConfig();
String getSessionKey();
String getServerID();
Economy getVault();
  • isPremium() indicates whether premium features are currently unlocked (valid license).
  • getBBB() indicates whether this is the build distributed through BuiltByBit.
  • getConfig() returns an abstraction (IConfigAPI) for reading the plugin’s configuration without depending directly on internal classes.
  • getVault() returns the Vault Economy instance, if available.
Object getPlotManager();
Object getWorldEditManager();
Object getMapManager();
Object getCommandRegistry();
PublicAPI api = (PublicAPI) Bukkit.getPluginManager().getPlugin("Plot");
IPlot plot = api.getPlotAt(player.getLocation());
if (plot != null) {
api.trustPlayer(plot, targetPlayer.getUniqueId());
double rating = api.getAverageRating(plot);
player.sendMessage("Average rating: " + rating);
}
if (api.isPremium()) {
player.sendMessage("Premium features are active on this server!");
}