Class PlotWorld

java.lang.Object
com.plotsquared.core.plot.PlotWorld
Direct Known Subclasses:
ScatteredPlotWorld, StandardPlotWorld

public abstract class PlotWorld extends Object
A world that contains plots
  • Constructor Details

    • PlotWorld

      protected PlotWorld(@NonNull String world)
      Create a new plot world with a given world name
      Parameters:
      world - World name
  • Method Details

    • getArea

      public abstract @Nullable PlotArea getArea(@NonNull Location location)
      Get the plot area that contains the given location, or null if the location is not a part of a plot area.
      Parameters:
      location - Location
      Returns:
      Containing plot area, or null
    • getAreas

      public abstract @NonNull Collection<PlotArea> getAreas()
      Get all plot areas in the world
      Returns:
      All plot areas in the world
    • getAreasInRegion

      public abstract @NonNull Collection<PlotArea> getAreasInRegion(@NonNull com.sk89q.worldedit.regions.CuboidRegion region)
      Get all plot areas in a specified region
      Parameters:
      region - Region
      Returns:
      All areas in the region
    • addArea

      public void addArea(@NonNull PlotArea area)
      Register a new area in the world
      Parameters:
      area - Plot area
    • removeArea

      public void removeArea(@NonNull PlotArea area)
      Remove an area from the world
      Parameters:
      area - Plot area
    • getWorld

      public String getWorld()
      Get the world name
      Returns:
      World name
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object