Interface IPlot
public interface IPlot
Represents a plot within the ScalaPlot system.
This interface provides comprehensive management of plot data, including
ownership, membership, banning, and behavioral flags.
-
Method Summary
Modifier and TypeMethodDescriptionvoidBans a player from entering or interacting with this plot.voidaddConnectedPlot(PlotId plotId) Internally connects a plot to this one.voidAdds a player to the trusted members list.voidAdds a rating from a player.booleanChecks if a player has permission to build on this plot.deletePlot(org.bukkit.entity.Player player, IPlot plot) Deletes the plot, resetting its physical blocks and clearing data.doubleCalculates the average rating of the plot.Gets a set of all players banned from this plot.org.bukkit.LocationGets the center location of the plot.Gets all plots connected/merged with this one.booleanGets the value of a specific flag.getFlags()Gets all currently set flags for this plot.getId()Gets the unique identifier of this plot.Gets a set of all trusted members for this plot.getName()Gets the custom name of the plot.getOwner()Gets the UUID of the plot owner.getPlayerRating(UUID player) Gets the rating given by a specific player.intGets the total number of ratings received.booleanhasOwner()Checks if the plot currently has an owner.booleanChecks if a player is currently banned from this plot.booleanChecks if a player is currently trusted on this plot.booleanChecks if a specific player is the owner of this plot.voidremoveBanned(UUID player) Removes a player from the banned list.voidremoveConnectedPlot(PlotId plotId) Internally disconnects a plot from this one.voidremoveMember(UUID player) Removes a player from the trusted members list.booleanreset()Resets the plot metadata (owner, members, etc.) to default values.voidSets a specific flag for this plot.voidSets a custom name for the plot.booleanSets the plot owner and triggers the appropriate events.voidsetOwnerSilent(UUID owner) Sets the plot owner without triggering events or notifications.
-
Method Details
-
getId
-
getOwner
-
setOwnerSilent
-
setOwner
-
hasOwner
boolean hasOwner()Checks if the plot currently has an owner.- Returns:
- true if owned, false if unclaimed.
-
isOwner
-
getName
-
setName
Sets a custom name for the plot.- Parameters:
name- The new name for the plot.
-
getMembers
-
addMember
-
removeMember
-
isMember
-
getBanned
-
addBanned
-
removeBanned
-
isBanned
-
canBuild
-
setFlag
-
getFlag
-
getFlags
-
getConnectedPlots
-
addConnectedPlot
Internally connects a plot to this one.- Parameters:
plotId- The ID of the plot to connect.
-
removeConnectedPlot
Internally disconnects a plot from this one.- Parameters:
plotId- The ID of the plot to disconnect.
-
getAverageRating
double getAverageRating()Calculates the average rating of the plot.- Returns:
- A double value between 0.0 and 5.0.
-
getRatingCount
int getRatingCount()Gets the total number of ratings received.- Returns:
- The rating count.
-
addRating
-
getPlayerRating
-
reset
boolean reset()Resets the plot metadata (owner, members, etc.) to default values.- Returns:
- true if reset successful.
-
deletePlot
Deletes the plot, resetting its physical blocks and clearing data.- Parameters:
player- The player initiating the deletion.plot- The plot to delete.- Returns:
- A
CompletableFuturewith thePlotResetResult.
-
getCenter
org.bukkit.Location getCenter()Gets the center location of the plot.- Returns:
- The
Locationof the plot center.
-