java.lang.Object
org.mvplugins.multiverse.inventories.profile.group.WorldGroup

public final class WorldGroup extends Object
  • Method Details

    • getName

      public String getName()
      Get the name of this World Group.
      Returns:
      Name of this World Group.
    • addWorld

      public void addWorld(String worldName)
      Adds a world to this world group and updates it in the Config.
      Parameters:
      worldName - The name of the world to add.
    • addWorld

      public void addWorld(String worldName, boolean updateConfig)
      Adds a world to this world group and optionally updates it in the Config.
      Parameters:
      worldName - The name of the world to add.
      updateConfig - True to update this group in the config.
    • addWorld

      public void addWorld(org.bukkit.World world)
      Convenience method to add a World to this World Group.
      Parameters:
      world - The world to add.
    • addWorlds

      public void addWorlds(Collection<String> worlds)
      Convenience method to add multiple worlds to this World Group and updates it in the Config.
      Parameters:
      worlds - A collections of worlds to add.
    • addWorlds

      public void addWorlds(Collection<String> worlds, boolean updateConfig)
      Convenience method to add multiple worlds to this World Group.
      Parameters:
      worlds - A collections of worlds to add.
      updateConfig - True to update this group in the config.
    • removeWorld

      public void removeWorld(String worldName)
      Removes a world from this world group and updates the group in the Config.
      Parameters:
      worldName - The name of the world to remove.
    • removeWorld

      public void removeWorld(String worldName, boolean updateConfig)
      Removes a world from this world group and optionally updates it in the Config.
      Parameters:
      worldName - The name of the world to remove.
      updateConfig - True to update this group in the config.
    • removeWorld

      public void removeWorld(org.bukkit.World world)
      Convenience method to remove a World from this World Group.
      Parameters:
      world - The world to remove.
    • removeWorlds

      public boolean removeWorlds(Collection<String> removeWorlds)
      Removes multiple worlds from this World Group.
      Parameters:
      removeWorlds - A collection of world names to remove.
      Returns:
      True if any of the worlds were removed.
    • removeAllWorlds

      public void removeAllWorlds()
      Remove all the worlds in this World Group.
    • removeAllWorlds

      public void removeAllWorlds(boolean updateConfig)
      Remove all the worlds in this World Group.
      Parameters:
      updateConfig - True to update this group in the config.
    • getWorlds

      public Set<String> getWorlds()
      Retrieves all of the worlds in this World Group.
      Returns:
      The worlds of this World Group.
    • isSharing

      public boolean isSharing(Sharable sharable)
      Checks if this group is sharing sharable. This will check both shares and negative shares of the group. This is the preferred method for checking if a group shares something as shares may contain ALL shares while ones indicated in negative shares means those aren't actually shared.
      Parameters:
      sharable - Sharable to check if sharing.
      Returns:
      true is the sharable is shared for this group.
    • getShares

      public Shares getShares()
      Retrieves the shares for this World Group. Any changes to this group must be subsequently saved to the data source for the changes to be permanent.
      Returns:
      The shares for this World Group.
    • getDisabledShares

      public Shares getDisabledShares()
    • getApplicableShares

      public Shares getApplicableShares()
    • recalculateApplicableShares

      public void recalculateApplicableShares()
    • containsWorld

      public boolean containsWorld(String worldName)
      Parameters:
      worldName - Name of world to check for.
      Returns:
      True if specified world is part of this group.
    • getSpawnWorld

      public String getSpawnWorld()
      Returns:
      The name of the world that will be used as the spawn for this group. Or null if no world was specified as the group spawn world.
    • setSpawnWorld

      public void setSpawnWorld(String worldName)
      Parameters:
      worldName - The name of the world to set this groups spawn to.
    • getSpawnPriority

      public org.bukkit.event.EventPriority getSpawnPriority()
      Returns:
      The priority for the respawn event that this spawn will act on.
    • setSpawnPriority

      public void setSpawnPriority(org.bukkit.event.EventPriority priority)
      Parameters:
      priority - The priority that will be used for respawning the player at this group's spawn location if there is one set.
    • isDefault

      public boolean isDefault()
      Is this a default group.
      Returns:
      true if this is the default group.
    • getGroupProfileContainer

      public ProfileContainer getGroupProfileContainer()
      Returns the profile container for this group.
      Returns:
      the profile container for this group.
    • toString

      public String toString()
      Overrides:
      toString in class Object