Interface HyperWorld

  • All Known Implementing Classes:
    SimpleWorld

    public interface HyperWorld
    World type used throughout Hyperverse
    • Method Detail

      • teleportPlayer

        void teleportPlayer​(@NotNull
                            @NotNull org.bukkit.entity.Player player)
        Teleport a player to this world
        Parameters:
        player - Player to teleport
      • getSpawn

        @Nullable
        @Nullable org.bukkit.Location getSpawn()
        Get the world spawn location
        Returns:
        World spawn
      • getWorldUUID

        @NotNull
        UUID getWorldUUID()
        Get the world UUID
        Returns:
        world UUID
      • getConfiguration

        @NotNull
        @NotNull WorldConfiguration getConfiguration()
        Get he world configuration
        Returns:
        World configuration
      • getBukkitWorld

        @Nullable
        @Nullable org.bukkit.World getBukkitWorld()
        Get the Bukkit world associated with this world
        Returns:
        Bukkit world instance
      • setBukkitWorld

        void setBukkitWorld​(@NotNull
                            @NotNull org.bukkit.World world)
        Set the Bukkit world associated with this world
        Parameters:
        world - Bukkit world instance
      • sendWorldInfo

        void sendWorldInfo​(@NotNull
                           @NotNull org.bukkit.command.CommandSender sender)
        Send world information to a command sender
        Parameters:
        sender - Sender that should receive the messages
      • saveConfiguration

        void saveConfiguration()
        Save the world configuration file asynchronously
      • isLoaded

        boolean isLoaded()
        Check whether or not the world is loaded
        Returns:
        True if the world is loaded, false if not
      • getFlag

        @NotNull
        <T> T getFlag​(@NotNull
                      @NotNull Class<? extends WorldFlag<T,​?>> flagClass)
        Get the value of a flag
        Type Parameters:
        T - Flag value type
        Parameters:
        flagClass - Flag class
        Returns:
        Flag value
      • removeFlag

        <T> void removeFlag​(@NotNull
                            @NotNull WorldFlag<T,​?> flag)
        Remove a flag from the world
        Type Parameters:
        T - Flag value type
        Parameters:
        flag - Flag to remove
      • setFlag

        <T> void setFlag​(@NotNull
                         @NotNull WorldFlag<T,​?> flag,
                         @NotNull
                         @NotNull String value)
                  throws FlagParseException
        Set the value of a flag in this world
        Type Parameters:
        T - Flag value type
        Parameters:
        flag - Flag to set
        value - Flag value
        Throws:
        FlagParseException - If the flag fails to parse
      • getTeleportationManager

        @NotNull
        @NotNull TeleportationManager getTeleportationManager()
        Get the teleportation manager belonging to this world
        Returns:
        The worlds' teleportation manager
      • refreshFlags

        void refreshFlags()
        Refresh the world flags
      • getFlags

        @NotNull
        @NotNull Collection<WorldFlag<?,​?>> getFlags()
        Return all applicable world flags
        Returns:
        Immutable view of all flags