Skip to content

Models & Enums

Interface representing a single plot. It’s the central object almost every PublicAPI method interacts with.

public interface IPlot {
PlotId getId();
String getName();
void setName(String name);
UUID getOwner();
boolean setOwner(UUID owner);
void setOwnerSilent(UUID owner);
boolean hasOwner();
boolean isOwner(UUID player);
Set<UUID> getMembers();
void addMember(UUID player);
void removeMember(UUID player);
boolean isMember(UUID player);
Set<UUID> getBanned();
void addBanned(UUID player);
void removeBanned(UUID player);
boolean isBanned(UUID player);
boolean canBuild(UUID player);
void setFlag(PlotFlag flag, boolean value);
boolean getFlag(PlotFlag flag);
Map<PlotFlag, Boolean> getFlags();
Set<PlotId> getConnectedPlots();
void addConnectedPlot(PlotId plotId);
void removeConnectedPlot(PlotId plotId);
double getAverageRating();
int getRatingCount();
void addRating(UUID player, int rating);
Integer getPlayerRating(UUID player);
ReportStatus getStatus();
void setStatus(ReportStatus status);
UUID getReporterUUID();
void setReporterUUID(UUID reporterUUID);
boolean reset();
CompletableFuture<PlotResetResult> deletePlot(Player player, IPlot plot);
Location getCenter();
String getWorldName();
void setPlotWeather(WeatherType weatherType);
WeatherType getPlotWeather();
}

A plot’s unique identifier within its world, based on grid coordinates (not world coordinates).

public class PlotId {
public PlotId(int x, int z);
public int getX();
public int getZ();
// String format: "x;z" — e.g. "3;-2"
public String toString();
public static PlotId fromString(String str);
}

Enum of the flags available for each plot. See the Plot Flags page for the complete list with descriptions, or use PlotFlag.fromString(String name) to convert a string (e.g. coming from a command) into the corresponding enum value.

public enum PlotFlag {
BREAK, PLACE, PVP, PVE, EXPLOSIONS, FIRE_SPREAD, VEICHLE_USE,
TNT_PLACING, ICE_FORM, SNOW_FORM, DIRT_GROW, CROP_GROW, VINE_GROW,
WATER_FLOW, LAVA_FLOW, REDSTONE, PRESSURE_PLATE, DOOR, LEVER,
BUTTON, ITEM_DROP, ITEM_PICKUP;
public String getName();
public String getDescription();
public static PlotFlag fromString(String name);
}

Returned by claimPlot(player), describing the outcome of a claim attempt.

Value Meaning
SUCCESS Claim succeeded
MAX_PLOTS_REACHED The player already owns the maximum number of plots allowed
NO_PLOTS_AVAILABLE No free plots available to claim
NOT_ENOUGHT_MONEY The player doesn’t have enough funds to pay claim_cost
CANCELLED The claim was cancelled (e.g. by a cancelled PlotClaimEvent)

Returned by resetPlot/deletePlot, describing the operation’s outcome.

Value Meaning
SUCCESS Operation completed successfully
PLOT_NOT_FOUND The specified plot doesn’t exist
PHYSICAL_RESET_ERROR Error while physically resetting the plot’s blocks

Represents a plot’s report status (Premium feature).

Value Meaning
NO_REPORT The plot has never been reported
REPORTED The plot has been reported and is awaiting review
REPORTED_AND_REVIEWED_AS_SAFE Reported but reviewed by staff and found to be fine
RESETTED The plot was reset following a confirmed report
MANUALLY_CLEANED Manually cleaned up by staff
FALSE_REPORT The report was judged unfounded