Module gomint.api
Package io.gomint

Interface GoMint


  • public interface GoMint
    Version:
    1.0
    Author:
    BlackyPaw, geNAZt
    • Method Detail

      • getMotd

        String getMotd()
        Get the server's message of the day (MOTD)
        Returns:
        The server's current MOTD
      • setMotd

        void setMotd​(String motd)
        Sets the server's message of the day (MOTD)
        Parameters:
        motd - The MOTD to be set
      • getWorld

        World getWorld​(String name)
        Get a world by its name. When the world is not loaded it will be tried to load
        Parameters:
        name - The name of the world
        Returns:
        the world or null if there was a error loading it
      • createItemStack

        <T extends ItemStack> T createItemStack​(Class<T> itemClass,
                                                int amount)
        Create a new itemstack with the given item in it
        Type Parameters:
        T - generic type of the itemstack
        Parameters:
        itemClass - which should be used to create
        amount - of items in the new created stack
        Returns:
        fresh generated itemstack of given type with amount of items
      • createEntity

        <T extends Entity> T createEntity​(Class<T> entityClass)
        Create a new entity
        Type Parameters:
        T - generic type of the entity
        Parameters:
        entityClass - which should be created
        Returns:
        fresh generated entity
      • getPlayers

        Collection<EntityPlayer> getPlayers()
        Get a collection of all players on this server
        Returns:
        collection of online players
      • getGroupManager

        GroupManager getGroupManager()
        Get the manager which manages permission groups
        Returns:
        permission group manager
      • instance

        static GoMint instance()
        Get the GoMint server instance currently running
        Returns:
        the started GoMint server instance
      • findPlayerByName

        EntityPlayer findPlayerByName​(String target)
        Find a player by its name
        Parameters:
        target - which we want to search
        Returns:
        the player or null if not found
      • findPlayerByUUID

        EntityPlayer findPlayerByUUID​(UUID target)
        Find a player by its uuid
        Parameters:
        target - which we want to search
        Returns:
        the player or null if not found
      • getPluginManager

        PluginManager getPluginManager()
        Get the plugin manager
        Returns:
        the plugin manager
      • getPort

        int getPort()
        Get the port this server has bound to
        Returns:
        port of this server
      • getMaxPlayers

        int getMaxPlayers()
        Get the amount of player which will fit on this server before it start declining logins
        Returns:
        amount of maximum players
      • getTPS

        double getTPS()
        Get current tickrate
        Returns:
        tickrate of this server
      • shutdown

        void shutdown()
        Shutdown this server
      • createButtonList

        ButtonList createButtonList​(String title)
        Create new button list for form display
        Parameters:
        title - of the button list
        Returns:
        button list implementation
      • createModal

        Modal createModal​(String title,
                          String question)
        Create a new modal for form display
        Parameters:
        title - of the modal
        question - for the client
        Returns:
        modal implementation
      • createCustomForm

        CustomForm createCustomForm​(String title)
        Create new custom form for form display
        Parameters:
        title - of the custom form
        Returns:
        custom form implementation
      • isMainThread

        boolean isMainThread()
        Check if current thread is GoMints main thread
        Returns:
        true if main thread, false if not
      • createPlayerSkin

        PlayerSkin createPlayerSkin​(InputStream inputStream)
        Create a player skin from the given input stream
        Parameters:
        inputStream - which should be read
        Returns:
        skin or null on error
      • getEmptyPlayerSkin

        PlayerSkin getEmptyPlayerSkin()
        Get the empty player skin
        Returns:
        empty player skin
      • getDefaultWorld

        World getDefaultWorld()
        Get the default world of this server
        Returns:
        default world
      • setDefaultWorld

        void setDefaultWorld​(World world)
        Set a new default world for this server
        Parameters:
        world - which should be used as default one
      • createBlock

        <T extends Block> T createBlock​(Class<T> blockClass)
        Create a empty block to be placed into the world with Block.copyFromBlock(Block) or Chunk.setBlock(int, int, int, Block)
        Type Parameters:
        T - type of block which the target object should have
        Parameters:
        blockClass - class of the block we want to create
        Returns:
        empty, not configured block
      • createWorld

        World createWorld​(String name,
                          CreateOptions options)
        Create a new world with the given options
        Parameters:
        name - of the new world
        options - which should be used to generate the world
        Returns:
        new world
      • getVersion

        String getVersion()
        Get the internal version of this server. This contains a git hash so its different on each build
        Returns:
        version of this server
      • dispatchCommand

        void dispatchCommand​(String line)
        Dispatch a command as console
        Parameters:
        line - which should be executed (without the /)
      • getWorlds

        Collection<World> getWorlds()
        Get a collection of all worlds on this server
        Returns:
        collection of worlds
      • createScoreboard

        Scoreboard createScoreboard()
        Create a new scoreboard
        Returns:
        new scoreboard