Class WorldGroup
java.lang.Object
org.mvplugins.multiverse.inventories.profile.group.WorldGroup
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a world to this world group and updates it in the Config.voidAdds a world to this world group and optionally updates it in the Config.voidaddWorld(org.bukkit.World world) Convenience method to add aWorldto this World Group.voidaddWorlds(Collection<String> worlds) Convenience method to add multiple worlds to this World Group and updates it in the Config.voidaddWorlds(Collection<String> worlds, boolean updateConfig) Convenience method to add multiple worlds to this World Group.booleancontainsWorld(String worldName) Retrieves all the worlds applicable in this World Group, after parsing wildcard and regex matches.Retrieves the set of worlds that were configured in the group config.Returns the profile container for this group.getName()Get the name of this World Group.Retrieves the shares for this World Group.org.bukkit.event.EventPriorityDeprecated, for removal: This API element is subject to removal in a future version.booleanIs this a default group.booleanChecks if this group is sharing sharable.voidvoidRecalculates the applicable worlds for this World Group based on the configured worlds.voidRemove all the worlds in this World Group.voidremoveAllWorlds(boolean updateConfig) Remove all the worlds in this World Group.voidremoveWorld(String worldName) Removes a world from this world group and updates the group in the Config.voidremoveWorld(String worldName, boolean updateConfig) Removes a world from this world group and optionally updates it in the Config.voidremoveWorld(org.bukkit.World world) Convenience method to remove aWorldfrom this World Group.booleanremoveWorlds(Collection<String> removeWorlds) Removes multiple worlds from this World Group.booleanremoveWorlds(Collection<String> removeWorlds, boolean updateConfig) Removes multiple worlds from this World Group and optionally updates the group in the Config.voidsetSpawnPriority(org.bukkit.event.EventPriority priority) voidsetSpawnWorld(String worldName) toString()
-
Method Details
-
getName
Get the name of this World Group.- Returns:
- Name of this World Group.
-
addWorld
Adds a world to this world group and updates it in the Config.- Parameters:
worldName- The name of the world to add.
-
addWorld
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 aWorldto this World Group.- Parameters:
world- The world to add.
-
addWorlds
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
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
Removes a world from this world group and updates the group in the Config.- Parameters:
worldName- The name of the world to remove.
-
removeWorld
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 aWorldfrom this World Group.- Parameters:
world- The world to remove.
-
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.
-
removeWorlds
Removes multiple worlds from this World Group and optionally updates the group in the Config.- 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.
-
containsWorld
- Parameters:
worldName- Name of world to check for.- Returns:
- True if specified world is part of this group.
-
getConfigWorlds
Retrieves the set of worlds that were configured in the group config.- Returns:
- The set of worlds that were configured in the group config.
- Since:
- 5.2
-
getApplicableWorlds
Retrieves all the worlds applicable in this World Group, after parsing wildcard and regex matches. Modifying this set will not change the worlds saved in the groups config.- Returns:
- The worlds of this World Group.
-
getWorlds
Deprecated, for removal: This API element is subject to removal in a future version.UsegetApplicableWorlds()instead.Retrieves all of the worlds in this World Group.
In 5.2, this method returns the same asgetApplicableWorlds(). To get the worlds string in groups config, usegetConfigWorlds()instead.- Returns:
- The worlds of this World Group.
-
recalculateApplicableWorlds
@AvailableSince("5.2") public void recalculateApplicableWorlds()Recalculates the applicable worlds for this World Group based on the configured worlds. -
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
- 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
Returns the profile container for this group.- Returns:
- the profile container for this group.
-
toString
-
getApplicableWorlds()instead.