Skip to content

API Introduction

ScalaPlot exposes a public API (the scalaplot-api module) that lets other plugins read and modify plot state: fetching plot info, managing trust/bans, claiming/resetting/deleting, ratings, report status, and dedicated Bukkit events.

Add Plot as a soft or hard dependency in your plugin.yml:

depend: [Plot]
# or, if optional:
softdepend: [Plot]

And add the ScalaPlot-API module (found in scalaplot-api/target/ScalaPlot-API-X.X.X.jar) as a compile-time dependency in your Maven/Gradle project.

  1. Retrieve the Plot plugin from Bukkit.
  2. Cast it to the PublicAPI interface.
  3. Call the available methods.
import com.scala.plotAPI.PublicAPI;
import org.bukkit.Bukkit;
PublicAPI api = (PublicAPI) Bukkit.getPluginManager().getPlugin("Plot");
if (api != null) {
boolean premium = api.isPremium();
// ...
}
  • Plot retrieval: by location, owner, or ID.
  • Trust and ban management: trustPlayer, untrustPlayer, banPlayer, unbanPlayer.
  • Plot operations: claimPlot, resetPlot, deletePlot.
  • Ratings and reports: getAverageRating, getStatus/setStatus.
  • Bukkit events: claim, ban, trust, enter/leave, ownership change, backup, reports.
  • Internal managers: access to PlotManager, WorldEditManager, MapManager for advanced usage.

Continue with PublicAPI: methods for the full reference.