Class MVWorld

  • All Implemented Interfaces:
    MultiverseWorld

    public class MVWorld
    extends java.lang.Object
    implements MultiverseWorld
    The implementation of a Multiverse handled world.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MVWorld.NullLocation
      Null-location.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean addToVariable​(java.lang.String property, java.lang.String value)
      Deprecated.
      This is deprecated.
      void allowPortalMaking​(AllowedPortalType portalType)
      Sets The types of portals that are allowed in this world.
      boolean canAnimalsSpawn()
      Gets whether or not animals are allowed to spawn in this world.
      boolean canMonstersSpawn()
      Gets whether or not monsters are allowed to spawn in this world.
      boolean clearList​(java.lang.String property)
      Deprecated.
      This is deprecated.
      boolean clearVariable​(java.lang.String property)
      Deprecated.
      This is deprecated.
      void copyValues​(MVWorld other)
      Copies all properties from another MVWorld object.
      void copyValues​(WorldProperties other)
      Copies all properties from a WorldProperties object.
      org.bukkit.permissions.Permission getAccessPermission()
      Gets the permission required to enter this world.
      boolean getAdjustSpawn()
      Gets whether or not Multiverse should auto-adjust the spawn for this world.
      java.lang.String getAlias()
      Gets the alias of this world.
      AllowedPortalType getAllowedPortals()
      Gets which type(s) of portals are allowed to be constructed in this world.
      boolean getAllowFlight()
      Whether or not players are allowed to fly in this world.
      java.lang.String getAllPropertyNames()
      Gets all the names of all properties that can be SET.
      java.util.List<java.lang.String> getAnimalList()
      Returns a list of animals.
      boolean getAutoHeal()
      Gets whether or not a world will auto-heal players if the difficulty is on peaceful.
      boolean getAutoLoad()
      Gets whether or not Multiverse should auto-load this world.
      boolean getBedRespawn()
      Gets whether or not a player who dies in this world will respawn in their bed or follow the normal respawn pattern.
      org.bukkit.World getCBWorld()
      Returns the Bukkit world object that this world describes.
      org.bukkit.ChatColor getColor()
      Gets the color that this world's name/alias will display as.
      java.lang.String getColoredWorldString()
      Returns a very nicely colored string (using Alias and Color if they are set).
      org.bukkit.Material getCurrency()
      Gets the type of currency that will be used when users enter this world.
      org.bukkit.Difficulty getDifficulty()
      Gets the difficulty of this world.
      org.bukkit.World.Environment getEnvironment()
      Gets the environment of this world.
      org.bukkit.permissions.Permission getExemptPermission()
      Gets the permission required to be exempt when entering.
      boolean getFakePVP()
      Deprecated.
      This is deprecated.
      org.bukkit.GameMode getGameMode()
      Gets the GameMode of this world.
      java.lang.String getGenerator()
      Gets the generator of this world.
      boolean getHunger()
      Gets whether or not the hunger level of players will go down in a world.
      java.util.List<java.lang.String> getMonsterList()
      Returns a list of monsters.
      java.lang.String getName()
      Gets the name of this world.
      java.lang.String getPermissibleName()
      Gets the lowercased name of the world.
      int getPlayerLimit()
      Gets the player limit for this world after which players without an override permission node will not be allowed in.
      double getPrice()
      Gets the amount of currency it requires to enter this world.
      java.lang.String getPropertyHelp​(java.lang.String property)
      Gets the help-message for a property.
      java.lang.String getPropertyValue​(java.lang.String property)
      Gets a property as String.
      org.bukkit.World getRespawnToWorld()
      Gets the world players will respawn in if they die in this one.
      double getScaling()
      Gets the scaling value of this world.Really only has an effect if you use Multiverse-NetherPortals.
      long getSeed()
      Gets the world seed of this world.
      org.bukkit.Location getSpawnLocation()
      Gets the spawn location of this world.
      org.bukkit.ChatColor getStyle()
      Gets the style that this world's name/alias will display as.
      java.lang.String getTime()
      Same as MultiverseWorld.getTime(), but returns a string.
      java.util.List<java.lang.String> getWorldBlacklist()
      Gets a list of all the worlds that players CANNOT travel to from this world, regardless of their access permissions.
      org.bukkit.WorldType getWorldType()
      Gets the type of this world.
      boolean isHidden()
      Gets whether or not this world will display in chat, mvw and mvl regardless if a user has the access permissions to go to this world.
      boolean isKeepingSpawnInMemory()
      Gets whether or not CraftBukkit is keeping the chunks for this world in memory.
      boolean isPVPEnabled()
      Gets whether or not PVP is enabled in this world in some form (fake or not).
      boolean isValidAliasColor​(java.lang.String aliasColor)
      Deprecated.
      This is deprecated.
      boolean isWeatherEnabled()
      Gets whether weather is enabled in this world.
      boolean removeFromVariable​(java.lang.String property, java.lang.String value)
      Deprecated.
      This is deprecated.
      void setAdjustSpawn​(boolean adjust)
      Sets whether or not Multiverse should auto-adjust the spawn for this world.
      void setAlias​(java.lang.String alias)
      Sets the alias of the world.
      void setAllowAnimalSpawn​(boolean animals)
      Sets whether or not animals can spawn.
      void setAllowFlight​(boolean allowFlight)
      Sets whether or not players are allowed to fly in this world.
      void setAllowMonsterSpawn​(boolean monsters)
      Sets whether or not monsters can spawn.
      void setAutoHeal​(boolean heal)
      Sets whether or not a world will auto-heal players if the difficulty is on peaceful.
      void setAutoLoad​(boolean load)
      Sets whether or not Multiverse should auto-load this world.
      void setBedRespawn​(boolean respawn)
      Sets whether or not a player who dies in this world will respawn in their bed or follow the normal respawn pattern.
      boolean setColor​(java.lang.String aliasColor)
      Sets the color that this world's name/alias will display as.
      void setCurrency​(@Nullable org.bukkit.Material currency)
      Sets the type of item that will be required given the price is not 0.
      boolean setDifficulty​(java.lang.String difficulty)
      Deprecated.
      This is deprecated.
      boolean setDifficulty​(org.bukkit.Difficulty difficulty)
      Sets the difficulty of this world and returns true on success.
      void setEnableWeather​(boolean weather)
      Sets whether or not there will be weather events in a given world.
      void setEnvironment​(org.bukkit.World.Environment environment)
      Sets the environment of a world.
      boolean setGameMode​(java.lang.String mode)
      Sets the game mode of this world.
      boolean setGameMode​(org.bukkit.GameMode mode)
      Sets the game mode of this world.
      void setGenerator​(java.lang.String generator)
      Sets the generator of this world.
      void setHidden​(boolean hidden)
      Sets whether or not this world will display in chat, mvw and mvl regardless if a user has the access permissions to go to this world.
      void setHunger​(boolean hunger)
      Sets whether or not the hunger level of players will go down in a world.
      void setKeepSpawnInMemory​(boolean value)
      If true, tells Craftbukkit to keep a worlds spawn chunks loaded in memory (default: true) If not, CraftBukkit will attempt to free memory when players have not used that world.
      void setPlayerLimit​(int limit)
      Sets the player limit for this world after which players without an override permission node will not be allowed in.
      void setPrice​(double price)
      Sets the price for entry to this world.
      boolean setPropertyValue​(java.lang.String property, java.lang.String value)
      Sets a property to a given value.
      void setPVPMode​(boolean pvp)
      Turn pvp on or off.
      boolean setRespawnToWorld​(java.lang.String respawnToWorld)
      Sets the world players will respawn in if they die in this one.
      boolean setScaling​(double scaling)
      Sets the scale of this world.
      void setSeed​(long seed)
      Sets the seed of this world.
      void setSpawnLocation​(org.bukkit.Location l)
      Sets the spawn location for a world.
      boolean setStyle​(java.lang.String style)
      Sets the style that this world's name/alias will display as.
      boolean setTime​(java.lang.String timeAsString)
      Sets the current time in a world.
      java.lang.String toString()  
      void validateEntitySpawns()
      This method is here to provide a stopgap until the add/remove/clear methods are implemented with SerializationConfig.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • validateEntitySpawns

        public void validateEntitySpawns()
        This method is here to provide a stopgap until the add/remove/clear methods are implemented with SerializationConfig.
      • copyValues

        public void copyValues​(MVWorld other)
        Copies all properties from another MVWorld object.
        Parameters:
        other - The other world object.
      • copyValues

        public void copyValues​(WorldProperties other)
        Copies all properties from a WorldProperties object.
        Parameters:
        other - The world properties object.
      • getCBWorld

        public org.bukkit.World getCBWorld()
        Returns the Bukkit world object that this world describes.
        Specified by:
        getCBWorld in interface MultiverseWorld
        Returns:
        A World
      • getColoredWorldString

        public java.lang.String getColoredWorldString()
        Returns a very nicely colored string (using Alias and Color if they are set).
        Specified by:
        getColoredWorldString in interface MultiverseWorld
        Returns:
        A nicely colored string.
      • clearList

        @Deprecated
        public boolean clearList​(java.lang.String property)
        Deprecated.
        This is deprecated.
        Clears a list property (sets it to []).
        Specified by:
        clearList in interface MultiverseWorld
        Parameters:
        property - The property to clear.
        Returns:
        True if success, false if fail.
      • clearVariable

        @Deprecated
        public boolean clearVariable​(java.lang.String property)
        Deprecated.
        This is deprecated.
        Removes all values from the given property. The property must be a AddProperties.
        Specified by:
        clearVariable in interface MultiverseWorld
        Parameters:
        property - The name of a AddProperties to clear.
        Returns:
        True if it was cleared, false if not.
      • addToVariable

        @Deprecated
        public boolean addToVariable​(java.lang.String property,
                                     java.lang.String value)
        Deprecated.
        This is deprecated.
        Adds a value to the given property. The property must be a AddProperties.
        Specified by:
        addToVariable in interface MultiverseWorld
        Parameters:
        property - The name of a AddProperties to add a value to.
        value - A value in string representation, it will be parsed to the correct type.
        Returns:
        True if the value was added, false if not.
      • removeFromVariable

        @Deprecated
        public boolean removeFromVariable​(java.lang.String property,
                                          java.lang.String value)
        Deprecated.
        This is deprecated.
        Removes a value from the given property. The property must be a AddProperties.
        Specified by:
        removeFromVariable in interface MultiverseWorld
        Parameters:
        property - The name of a AddProperties to remove a value from.
        value - A value in string representation, it will be parsed to the correct type.
        Returns:
        True if the value was removed, false if not.
      • setPropertyValue

        public boolean setPropertyValue​(java.lang.String property,
                                        java.lang.String value)
                                 throws PropertyDoesNotExistException
        Sets a property to a given value.
        Specified by:
        setPropertyValue in interface MultiverseWorld
        Parameters:
        property - The name of a world property to set.
        value - A value in string representation, it will be parsed to the correct type.
        Returns:
        True if the value was set, false if not.
        Throws:
        PropertyDoesNotExistException - Thrown if the property was not found in the world.
      • getWorldType

        public org.bukkit.WorldType getWorldType()
        Gets the type of this world. As of 1.2 this will be: FLAT, NORMAL or VERSION_1_1

        This is not the generator.

        Specified by:
        getWorldType in interface MultiverseWorld
        Returns:
        The Type of this world.
      • getEnvironment

        public org.bukkit.World.Environment getEnvironment()
        Gets the environment of this world.
        Specified by:
        getEnvironment in interface MultiverseWorld
        Returns:
        A World.Environment.
      • setEnvironment

        public void setEnvironment​(org.bukkit.World.Environment environment)
        Sets the environment of a world.

        Note: This will ONLY take effect once the world is unloaded/reloaded.

        Specified by:
        setEnvironment in interface MultiverseWorld
        Parameters:
        environment - A World.Environment.
      • getSeed

        public long getSeed()
        Gets the world seed of this world.
        Specified by:
        getSeed in interface MultiverseWorld
        Returns:
        The Long version of the seed.
      • setSeed

        public void setSeed​(long seed)
        Sets the seed of this world.
        Specified by:
        setSeed in interface MultiverseWorld
        Parameters:
        seed - A Long that is the seed.
      • getGenerator

        public java.lang.String getGenerator()
        Gets the generator of this world.
        Specified by:
        getGenerator in interface MultiverseWorld
        Returns:
        The name of the generator.
      • setGenerator

        public void setGenerator​(java.lang.String generator)
        Sets the generator of this world.
        Specified by:
        setGenerator in interface MultiverseWorld
        Parameters:
        generator - The new generator's name.
      • getPlayerLimit

        public int getPlayerLimit()
        Gets the player limit for this world after which players without an override permission node will not be allowed in. A value of -1 or less signifies no limit
        Specified by:
        getPlayerLimit in interface MultiverseWorld
        Returns:
        The player limit
      • setPlayerLimit

        public void setPlayerLimit​(int limit)
        Sets the player limit for this world after which players without an override permission node will not be allowed in. A value of -1 or less signifies no limit
        Specified by:
        setPlayerLimit in interface MultiverseWorld
        Parameters:
        limit - The new limit
      • getName

        public java.lang.String getName()
        Gets the name of this world. The name cannot be changed.

        Note for plugin developers: Usually MultiverseWorld.getAlias() is what you want to use instead of this method.

        Specified by:
        getName in interface MultiverseWorld
        Returns:
        The name of the world as a String.
      • getPermissibleName

        public java.lang.String getPermissibleName()
        Gets the lowercased name of the world. This method is required, since the permissables lowercase all permissions when recalculating.

        Note: This also means if a user has worlds named: world and WORLD, that they can both exist, and both be teleported to independently, but their permissions **cannot** be uniqueified at this time. See bug report #.

        Specified by:
        getPermissibleName in interface MultiverseWorld
        Returns:
        The lowercased name of the world.
      • getAlias

        public java.lang.String getAlias()
        Gets the alias of this world.

        This alias allows users to have a world named "world" but show up in the list as "FernIsland"

        Specified by:
        getAlias in interface MultiverseWorld
        Returns:
        The alias of the world as a String.
      • setAlias

        public void setAlias​(java.lang.String alias)
        Sets the alias of the world.
        Specified by:
        setAlias in interface MultiverseWorld
        Parameters:
        alias - A string that is the new alias.
      • canAnimalsSpawn

        public boolean canAnimalsSpawn()
        Gets whether or not animals are allowed to spawn in this world.
        Specified by:
        canAnimalsSpawn in interface MultiverseWorld
        Returns:
        True if ANY animal can, false if no animals can spawn.
      • setAllowAnimalSpawn

        public void setAllowAnimalSpawn​(boolean animals)
        Sets whether or not animals can spawn. If there are values in MultiverseWorld.getAnimalList() and this is false, those animals become the exceptions, and will spawn
        Specified by:
        setAllowAnimalSpawn in interface MultiverseWorld
        Parameters:
        animals - True to allow spawning of monsters, false to prevent.
      • canMonstersSpawn

        public boolean canMonstersSpawn()
        Gets whether or not monsters are allowed to spawn in this world.
        Specified by:
        canMonstersSpawn in interface MultiverseWorld
        Returns:
        True if ANY monster can, false if no monsters can spawn.
      • setAllowMonsterSpawn

        public void setAllowMonsterSpawn​(boolean monsters)
        Sets whether or not monsters can spawn. If there are values in MultiverseWorld.getMonsterList() and this is false, those monsters become the exceptions, and will spawn
        Specified by:
        setAllowMonsterSpawn in interface MultiverseWorld
        Parameters:
        monsters - True to allow spawning of monsters, false to prevent.
      • isPVPEnabled

        public boolean isPVPEnabled()
        Gets whether or not PVP is enabled in this world in some form (fake or not).
        Specified by:
        isPVPEnabled in interface MultiverseWorld
        Returns:
        True if players can take damage from other players.
      • setPVPMode

        public void setPVPMode​(boolean pvp)
        Turn pvp on or off. This setting is used to set the world's PVP mode.
        Specified by:
        setPVPMode in interface MultiverseWorld
        Parameters:
        pvp - True to enable PVP damage, false to disable it.
      • isHidden

        public boolean isHidden()
        Gets whether or not this world will display in chat, mvw and mvl regardless if a user has the access permissions to go to this world.
        Specified by:
        isHidden in interface MultiverseWorld
        Returns:
        True if the world will be hidden, false if not.
      • setHidden

        public void setHidden​(boolean hidden)
        Sets whether or not this world will display in chat, mvw and mvl regardless if a user has the access permissions to go to this world.
        Specified by:
        setHidden in interface MultiverseWorld
        Parameters:
        hidden - Set
      • getWorldBlacklist

        public java.util.List<java.lang.String> getWorldBlacklist()
        Gets a list of all the worlds that players CANNOT travel to from this world, regardless of their access permissions.
        Specified by:
        getWorldBlacklist in interface MultiverseWorld
        Returns:
        A List of world names.
      • getScaling

        public double getScaling()
        Gets the scaling value of this world.Really only has an effect if you use Multiverse-NetherPortals.
        Specified by:
        getScaling in interface MultiverseWorld
        Returns:
        This world's non-negative, non-zero scale.
      • setScaling

        public boolean setScaling​(double scaling)
        Sets the scale of this world. Really only has an effect if you use Multiverse-NetherPortals.
        Specified by:
        setScaling in interface MultiverseWorld
        Parameters:
        scaling - A scaling value, cannot be negative or 0.
        Returns:
        Whether the scale was set successfully.
      • setColor

        public boolean setColor​(java.lang.String aliasColor)
        Sets the color that this world's name/alias will display as.
        Specified by:
        setColor in interface MultiverseWorld
        Parameters:
        aliasColor - A valid color name.
        Returns:
        True if the color was set, false if not.
      • isValidAliasColor

        @Deprecated
        public boolean isValidAliasColor​(java.lang.String aliasColor)
        Deprecated.
        This is deprecated.
        Tells you if someone entered a valid color.
        Specified by:
        isValidAliasColor in interface MultiverseWorld
        Parameters:
        aliasColor - A string that may translate to a color.
        Returns:
        True if it is a color, false if not.
      • getColor

        public org.bukkit.ChatColor getColor()
        Gets the color that this world's name/alias will display as.
        Specified by:
        getColor in interface MultiverseWorld
        Returns:
        The color of this world.
      • getFakePVP

        @Deprecated
        public boolean getFakePVP()
        Deprecated.
        This is deprecated.
        Turn pvp on or off. This setting is used to set the world's PVP mode, and thus relies on fakePVP
        Specified by:
        getFakePVP in interface MultiverseWorld
        Returns:
        True if this world has fakepvp on
      • getRespawnToWorld

        public org.bukkit.World getRespawnToWorld()
        Gets the world players will respawn in if they die in this one.
        Specified by:
        getRespawnToWorld in interface MultiverseWorld
        Returns:
        A world that exists on the server.
      • setRespawnToWorld

        public boolean setRespawnToWorld​(java.lang.String respawnToWorld)
        Sets the world players will respawn in if they die in this one. Returns true upon success, false upon failure.
        Specified by:
        setRespawnToWorld in interface MultiverseWorld
        Parameters:
        respawnToWorld - The name of a world that exists on the server.
        Returns:
        True if respawnWorld existed, false if not.
      • getAccessPermission

        public org.bukkit.permissions.Permission getAccessPermission()
        Gets the permission required to enter this world.
        Specified by:
        getAccessPermission in interface MultiverseWorld
        Returns:
        The permission required to be exempt from charges to/from this world.
      • getCurrency

        public org.bukkit.Material getCurrency()
        Gets the type of currency that will be used when users enter this world. A value of null indicates a non-item based currency is used.
        Specified by:
        getCurrency in interface MultiverseWorld
        Returns:
        The type of currency that will be used when users enter this world.
      • setCurrency

        public void setCurrency​(@Nullable
                                @Nullable org.bukkit.Material currency)
        Sets the type of item that will be required given the price is not 0. Use a value of null to specify a non-item based currency.
        Specified by:
        setCurrency in interface MultiverseWorld
        Parameters:
        currency - The Type of currency that will be used when users enter this world.
      • getPrice

        public double getPrice()
        Gets the amount of currency it requires to enter this world.
        Specified by:
        getPrice in interface MultiverseWorld
        Returns:
        The amount it costs to enter this world.
      • setPrice

        public void setPrice​(double price)
        Sets the price for entry to this world. You can think of this like an amount. The type can be set with MultiverseWorld.setCurrency(Material)
        Specified by:
        setPrice in interface MultiverseWorld
        Parameters:
        price - The Amount of money/item to enter the world.
      • getExemptPermission

        public org.bukkit.permissions.Permission getExemptPermission()
        Gets the permission required to be exempt when entering.
        Specified by:
        getExemptPermission in interface MultiverseWorld
        Returns:
        The permission required to be exempt when entering.
      • setGameMode

        public boolean setGameMode​(java.lang.String mode)
        Sets the game mode of this world.
        Specified by:
        setGameMode in interface MultiverseWorld
        Parameters:
        mode - A valid game mode string (either an int ex. 0 or a string ex. creative).
        Returns:
        True if the game mode was successfully changed, false if not.
      • setGameMode

        public boolean setGameMode​(org.bukkit.GameMode mode)
        Description copied from interface: MultiverseWorld
        Sets the game mode of this world.
        Specified by:
        setGameMode in interface MultiverseWorld
        Parameters:
        mode - The new GameMode.
        Returns:
        True if the game mode was successfully changed, false if not.
      • getGameMode

        public org.bukkit.GameMode getGameMode()
        Gets the GameMode of this world.
        Specified by:
        getGameMode in interface MultiverseWorld
        Returns:
        The GameMode of this world.
      • setEnableWeather

        public void setEnableWeather​(boolean weather)
        Sets whether or not there will be weather events in a given world. If set to false, Multiverse will disable the weather in the world immediately.
        Specified by:
        setEnableWeather in interface MultiverseWorld
        Parameters:
        weather - True if weather events should occur in a world, false if not.
      • isWeatherEnabled

        public boolean isWeatherEnabled()
        Gets whether weather is enabled in this world.
        Specified by:
        isWeatherEnabled in interface MultiverseWorld
        Returns:
        True if weather events will occur, false if not.
      • isKeepingSpawnInMemory

        public boolean isKeepingSpawnInMemory()
        Gets whether or not CraftBukkit is keeping the chunks for this world in memory.
        Specified by:
        isKeepingSpawnInMemory in interface MultiverseWorld
        Returns:
        True if CraftBukkit is keeping spawn chunks in memory.
      • setKeepSpawnInMemory

        public void setKeepSpawnInMemory​(boolean value)
        If true, tells Craftbukkit to keep a worlds spawn chunks loaded in memory (default: true) If not, CraftBukkit will attempt to free memory when players have not used that world. This will not happen immediately.
        Specified by:
        setKeepSpawnInMemory in interface MultiverseWorld
        Parameters:
        value - If true, CraftBukkit will keep the spawn chunks loaded in memory.
      • getHunger

        public boolean getHunger()
        Gets whether or not the hunger level of players will go down in a world.
        Specified by:
        getHunger in interface MultiverseWorld
        Returns:
        True if it will go down, false if it will remain steady.
      • setHunger

        public void setHunger​(boolean hunger)
        Sets whether or not the hunger level of players will go down in a world.
        Specified by:
        setHunger in interface MultiverseWorld
        Parameters:
        hunger - True if hunger will go down, false to keep it at the level they entered a world with.
      • getSpawnLocation

        public org.bukkit.Location getSpawnLocation()
        Gets the spawn location of this world.
        Specified by:
        getSpawnLocation in interface MultiverseWorld
        Returns:
        The spawn location of this world.
      • setSpawnLocation

        public void setSpawnLocation​(org.bukkit.Location l)
        Sets the spawn location for a world.
        Specified by:
        setSpawnLocation in interface MultiverseWorld
        Parameters:
        l - The spawn location for a world.
      • getDifficulty

        public org.bukkit.Difficulty getDifficulty()
        Gets the difficulty of this world.
        Specified by:
        getDifficulty in interface MultiverseWorld
        Returns:
        The difficulty of this world.
      • setDifficulty

        @Deprecated
        public boolean setDifficulty​(java.lang.String difficulty)
        Deprecated.
        This is deprecated.
        Sets the difficulty of this world and returns true if success. Valid string values are either an integer of difficulty(0-3) or the name that resides in the Bukkit enum, ex. PEACEFUL
        Specified by:
        setDifficulty in interface MultiverseWorld
        Parameters:
        difficulty - The difficulty to set the world to as a string.
        Returns:
        True if success, false if the provided string could not be translated to a difficulty.
      • setDifficulty

        public boolean setDifficulty​(org.bukkit.Difficulty difficulty)
        Description copied from interface: MultiverseWorld
        Sets the difficulty of this world and returns true on success. Valid string values are either an integer of difficulty(0-3) or the name that resides in the Bukkit enum, ex. PEACEFUL
        Specified by:
        setDifficulty in interface MultiverseWorld
        Parameters:
        difficulty - The new difficulty.
        Returns:
        True if success, false if the operation failed... for whatever reason.
      • getAutoHeal

        public boolean getAutoHeal()
        Gets whether or not a world will auto-heal players if the difficulty is on peaceful.
        Specified by:
        getAutoHeal in interface MultiverseWorld
        Returns:
        True if the world should heal (default), false if not.
      • setAutoHeal

        public void setAutoHeal​(boolean heal)
        Sets whether or not a world will auto-heal players if the difficulty is on peaceful.
        Specified by:
        setAutoHeal in interface MultiverseWorld
        Parameters:
        heal - True if the world will heal.
      • setAdjustSpawn

        public void setAdjustSpawn​(boolean adjust)
        Sets whether or not Multiverse should auto-adjust the spawn for this world.
        Specified by:
        setAdjustSpawn in interface MultiverseWorld
        Parameters:
        adjust - True if multiverse should adjust the spawn, false if not.
      • getAdjustSpawn

        public boolean getAdjustSpawn()
        Gets whether or not Multiverse should auto-adjust the spawn for this world.
        Specified by:
        getAdjustSpawn in interface MultiverseWorld
        Returns:
        True if Multiverse should adjust the spawn, false if not.
      • setAutoLoad

        public void setAutoLoad​(boolean load)
        Sets whether or not Multiverse should auto-load this world.

        True is default.

        Specified by:
        setAutoLoad in interface MultiverseWorld
        Parameters:
        load - True if multiverse should autoload this world the spawn, false if not.
      • getAutoLoad

        public boolean getAutoLoad()
        Gets whether or not Multiverse should auto-load this world.
        Specified by:
        getAutoLoad in interface MultiverseWorld
        Returns:
        True if Multiverse should auto-load this world.
      • setBedRespawn

        public void setBedRespawn​(boolean respawn)
        Sets whether or not a player who dies in this world will respawn in their bed or follow the normal respawn pattern.

        True is default.

        Specified by:
        setBedRespawn in interface MultiverseWorld
        Parameters:
        respawn - True if players dying in this world respawn at their bed.
      • getBedRespawn

        public boolean getBedRespawn()
        Gets whether or not a player who dies in this world will respawn in their bed or follow the normal respawn pattern.
        Specified by:
        getBedRespawn in interface MultiverseWorld
        Returns:
        True if players dying in this world should respawn at their bed.
      • getAllPropertyNames

        public java.lang.String getAllPropertyNames()
        Gets all the names of all properties that can be SET.
        Specified by:
        getAllPropertyNames in interface MultiverseWorld
        Returns:
        All property names, with alternating colors.
      • setTime

        public boolean setTime​(java.lang.String timeAsString)
        Sets the current time in a world.

        This method will take the following formats: 11:37am 4:30p day(morning), night, noon, midnight

        Specified by:
        setTime in interface MultiverseWorld
        Parameters:
        timeAsString - The formatted time to set the world to.
        Returns:
        True if the time was set, false if not.
      • getAllowedPortals

        public AllowedPortalType getAllowedPortals()
        Gets which type(s) of portals are allowed to be constructed in this world.
        Specified by:
        getAllowedPortals in interface MultiverseWorld
        Returns:
        The type of portals that are allowed.
      • allowPortalMaking

        public void allowPortalMaking​(AllowedPortalType portalType)
        Sets The types of portals that are allowed in this world.
        Specified by:
        allowPortalMaking in interface MultiverseWorld
        Parameters:
        portalType - The type of portals allowed in this world.
      • getStyle

        public org.bukkit.ChatColor getStyle()
        Gets the style that this world's name/alias will display as.
        Specified by:
        getStyle in interface MultiverseWorld
        Returns:
        The style of this world. null for "normal" style.
      • setStyle

        public boolean setStyle​(java.lang.String style)
        Sets the style that this world's name/alias will display as.
        Specified by:
        setStyle in interface MultiverseWorld
        Parameters:
        style - A valid style name.
        Returns:
        True if the style was set, false if not.
      • getAllowFlight

        public boolean getAllowFlight()
        Whether or not players are allowed to fly in this world.
        Specified by:
        getAllowFlight in interface MultiverseWorld
        Returns:
        True if players allowed to fly in this world.
      • setAllowFlight

        public void setAllowFlight​(boolean allowFlight)
        Sets whether or not players are allowed to fly in this world.
        Specified by:
        setAllowFlight in interface MultiverseWorld
        Parameters:
        allowFlight - True to allow flight in this world.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object