com.intellectualcrafters.plot.object

## Class Plot

- java.lang.Object
- - com.intellectualcrafters.plot.object.Plot

- All Implemented Interfaces:
    java.lang.Cloneable

      public class Plot
      extends java.lang.Object
      implements java.lang.Cloneable

  The plot class

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `countsTowardsMax`
    `boolean` | `delete` Delete on next save cycle?
    `java.util.ArrayList<java.util.UUID>` | `denied` List of denied players
    `boolean` | `deny_entry` Deny Entry
    `boolean` | `hasChanged` Has the plot changed since the last save cycle?
    `java.util.ArrayList<java.util.UUID>` | `helpers` List of helpers (with plot permissions)
    `PlotId` | `id` plot ID
    `java.util.UUID` | `owner` plot owner
    `PlotSettings` | `settings` External settings class
    `java.util.ArrayList<java.util.UUID>` | `trusted` List of trusted users (with plot permissions)
    `java.lang.String` | `world` plot world

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Plot(PlotId id, java.util.UUID owner, org.bukkit.block.Biome plotBiome, java.util.ArrayList<java.util.UUID> helpers, java.util.ArrayList<java.util.UUID> trusted, java.util.ArrayList<java.util.UUID> denied, java.lang.String alias, PlotHomePosition position, Flag[] flags, java.lang.String world, boolean[] merged)` Constructor for saved plots
    `Plot(PlotId id, java.util.UUID owner, org.bukkit.block.Biome plotBiome, java.util.ArrayList<java.util.UUID> helpers, java.util.ArrayList<java.util.UUID> denied, java.lang.String world)` Primary constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDenied(java.util.UUID uuid)` Deny someone (use DBFunc.addDenied() as well)
    `void` | `addHelper(java.util.UUID uuid)` Add someone as a helper (use DBFunc as well)
    `void` | `addTrusted(java.util.UUID uuid)` Add someone as a trusted user (use DBFunc as well)
    `void` | `clear(org.bukkit.entity.Player plr)` Clear a plot
    `java.lang.Object` | `clone()` Get a clone of the plot
    `boolean` | `deny_entry(org.bukkit.entity.Player player)` Should the player be allowed to enter?
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getDisplayName()` Get plot display name
    `PlotId` | `getId()` Get the plot ID
    `java.util.UUID` | `getOwner()` Get the UUID of the owner
    `org.bukkit.World` | `getWorld()` Get the plot World
    `int` | `hashCode()` Get the plot hashcode
    `boolean` | `hasOwner()` Check if the plot has a set owner
    `boolean` | `hasRights(org.bukkit.entity.Player player)` Check if the player is either the owner or on the helpers list
    `void` | `removeDenied(java.util.UUID uuid)` Remove a denied player (use DBFunc as well)
    `void` | `removeHelper(java.util.UUID uuid)` Remove a helper (use DBFunc as well)
    `void` | `removeTrusted(java.util.UUID uuid)` Remove a trusted user (use DBFunc as well)
    `void` | `setOwner(org.bukkit.entity.Player player)` Set the owner

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### id

          public PlotId id

      plot ID

    - #### world

          public java.lang.String world

      plot world

    - #### owner

          public java.util.UUID owner

      plot owner

    - #### deny_entry

          public boolean deny_entry

      Deny Entry

    - #### helpers

          public java.util.ArrayList<java.util.UUID> helpers

      List of helpers (with plot permissions)

    - #### trusted

          public java.util.ArrayList<java.util.UUID> trusted

      List of trusted users (with plot permissions)

    - #### denied

          public java.util.ArrayList<java.util.UUID> denied

      List of denied players

    - #### settings

          public PlotSettings settings

      External settings class

    - #### delete

          public boolean delete

      Delete on next save cycle?

    - #### hasChanged

          public boolean hasChanged

      Has the plot changed since the last save cycle?

    - #### countsTowardsMax

          public boolean countsTowardsMax

  - ### Constructor Detail

    - #### Plot

          public Plot(PlotId id,
              java.util.UUID owner,
              org.bukkit.block.Biome plotBiome,
              java.util.ArrayList<java.util.UUID> helpers,
              java.util.ArrayList<java.util.UUID> denied,
              java.lang.String world)

      Primary constructor
      Parameters:
        `id` -
        `owner` -
        `plotBiome` -
        `helpers` -
        `denied` -

    - #### Plot

          public Plot(PlotId id,
              java.util.UUID owner,
              org.bukkit.block.Biome plotBiome,
              java.util.ArrayList<java.util.UUID> helpers,
              java.util.ArrayList<java.util.UUID> trusted,
              java.util.ArrayList<java.util.UUID> denied,
              java.lang.String alias,
              PlotHomePosition position,
              Flag[] flags,
              java.lang.String world,
              boolean[] merged)

      Constructor for saved plots
      Parameters:
        `id` -
        `owner` -
        `plotBiome` -
        `helpers` -
        `denied` -
        `merged` -

  - ### Method Detail

    - #### hasOwner

          public boolean hasOwner()

      Check if the plot has a set owner
      Returns:
        false if there is no owner

    - #### hasRights

          public boolean hasRights(org.bukkit.entity.Player player)

      Check if the player is either the owner or on the helpers list
      Parameters:
        `player` -
      Returns:
        true if the player is added as a helper or is the owner

    - #### deny_entry

          public boolean deny_entry(org.bukkit.entity.Player player)

      Should the player be allowed to enter?
      Parameters:
        `player` -
      Returns:
        false if the player is allowed to enter

    - #### getOwner

          public java.util.UUID getOwner()

      Get the UUID of the owner

    - #### setOwner

          public void setOwner(org.bukkit.entity.Player player)

      Set the owner
      Parameters:
        `player` -

    - #### getId

          public PlotId getId()

      Get the plot ID

    - #### getWorld

          public org.bukkit.World getWorld()

      Get the plot World

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Get a clone of the plot
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
      Throws:
        `java.lang.CloneNotSupportedException`

    - #### addDenied

          public void addDenied(java.util.UUID uuid)

      Deny someone (use DBFunc.addDenied() as well)
      Parameters:
        `uuid` -

    - #### addHelper

          public void addHelper(java.util.UUID uuid)

      Add someone as a helper (use DBFunc as well)
      Parameters:
        `uuid` -

    - #### addTrusted

          public void addTrusted(java.util.UUID uuid)

      Add someone as a trusted user (use DBFunc as well)
      Parameters:
        `uuid` -

    - #### getDisplayName

          public java.lang.String getDisplayName()

      Get plot display name
      Returns:
        alias if set, else id

    - #### removeDenied

          public void removeDenied(java.util.UUID uuid)

      Remove a denied player (use DBFunc as well)
      Parameters:
        `uuid` -

    - #### removeHelper

          public void removeHelper(java.util.UUID uuid)

      Remove a helper (use DBFunc as well)
      Parameters:
        `uuid` -

    - #### removeTrusted

          public void removeTrusted(java.util.UUID uuid)

      Remove a trusted user (use DBFunc as well)
      Parameters:
        `uuid` -

    - #### clear

          public void clear(org.bukkit.entity.Player plr)

      Clear a plot
      Parameters:
        `plr` - initiator

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Get the plot hashcode
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        integer. You can easily make this a character array
        xI = c[0] x = c[1 -> xI...] yI = c[xI ... + 1] y = c[xI ... + 2 -> yI ...]