java.lang.Object
net.ME1312.SubServers.Client.Bukkit.Graphic.UIRenderer
Direct Known Subclasses:
DefaultUIRenderer

public abstract class UIRenderer extends Object
GUI Renderer Layout Class
  • Constructor Details

    • UIRenderer

      public UIRenderer(SubPlugin plugin, Player player)
      Creates a new UIRenderer
      Parameters:
      plugin - SubPlugin
      player - Player
  • Method Details

    • newUI

      public abstract void newUI()
      Opens a new window
    • clearHistory

      public abstract void clearHistory()
      Clears the Window History
    • hasHistory

      public abstract boolean hasHistory()
      If there is any Window History
      Returns:
      Window History Status
    • reopen

      public abstract void reopen()
      Reopens the current window
    • back

      public abstract void back()
      Reopens the previous window
    • sendTitle

      public boolean sendTitle(String str)
      Attempt to send a Title Message
      Parameters:
      str - Message
      Returns:
      Success Status
    • sendTitle

      public boolean sendTitle(String str, int stay)
      Attempt to send a Title Message
      Parameters:
      str - Message
      stay - How long the message should stay
      Returns:
      Success Status
    • sendTitle

      public boolean sendTitle(String str, int fadein, int stay, int fadeout)
      Attempt to send a Title Message
      Parameters:
      str - Message
      fadein - FadeIn Transition length (in ticks)
      stay - How long the message should stay (in ticks)
      fadeout - FadeOut Transition length (in ticks)
      Returns:
      Success Status
    • sendTitle

      public boolean sendTitle(String line1, String line2, int fadein, int stay, int fadeout)
      Attempt to send a Title Message
      Parameters:
      line1 - Message
      line2 - Message
      fadein - FadeIn Transition length (in ticks)
      stay - How long the message should stay (in ticks)
      fadeout - FadeOut Transition length (in ticks)
      Returns:
      Success Status
    • canSendTitle

      public boolean canSendTitle()
      See if Title Messages are available for use
      Returns:
      Title Message Availability
    • setDownloading

      public void setDownloading(String subtitle)
      Shows/Hides the Downloading Title Message
      Parameters:
      subtitle - Subtitle to display (or null to hide)
    • parseItem

      public ItemStack parseItem(String str)
      Parse an ItemStack from a String
      Parameters:
      str - String to parse
      Returns:
      ItemStack
    • parseItem

      public ItemStack parseItem(String str, ItemStack def)
      Parse an ItemStack from a String
      Parameters:
      str - String to parse
      def - Default to return if unable to parse
      Returns:
      ItemStack
    • addHostPlugin

      public static void addHostPlugin(String handle, PluginRenderer<Host> renderer)
      Add Host Plugin
      Parameters:
      handle - Handle to bind
      renderer - Renderer
    • getHostPlugins

      public static Map<String,PluginRenderer<Host>> getHostPlugins()
      Get Host Plugins
      Returns:
      Host Plugins
    • removeHostPlugin

      public static void removeHostPlugin(String handle)
      Remove Host Plugin
      Parameters:
      handle - Handle
    • addServerPlugin

      public static void addServerPlugin(String handle, PluginRenderer<Server> renderer)
      Add Server Plugin
      Parameters:
      handle - Handle to bind
      renderer - Renderer
    • getServerPlugins

      public static Map<String,PluginRenderer<Server>> getServerPlugins()
      Get Server Plugins
      Returns:
      SubServer Plugins
    • removeServerPlugin

      public static void removeServerPlugin(String handle)
      Remove Server Plugin
      Parameters:
      handle - Handle
    • hostMenu

      public abstract void hostMenu(int page)
      Opens the Host Menu
      Parameters:
      page - Page Number (starting from page 1)
    • hostAdmin

      public abstract void hostAdmin(String host)
      Opens Host/<name>
      Parameters:
      host - Host Name
    • hostCreator

      public abstract void hostCreator(UIRenderer.CreatorOptions options)
      Opens Host/<name>/Create
      Parameters:
      options - Creator Options
    • hostPlugin

      public abstract void hostPlugin(int page, String host)
      Opens Host/<name>/Plugins
      Parameters:
      host - Host Name
    • groupMenu

      public abstract void groupMenu(int page)
      Opens the Group Menu
      Parameters:
      page - Page Number (starting from page 1)
    • serverMenu

      public abstract void serverMenu(int page, String host, String group)
      Opens the SubServer Menu
      Parameters:
      page - Page Number (starting from page 1)
      host - Host Name (or null to scan all hosts)
    • serverAdmin

      public abstract void serverAdmin(String server)
      Opens Server/<name>
      Parameters:
      server - SubServer Name
    • serverPlugin

      public abstract void serverPlugin(int page, String server)
      Opens Server/<name>/Plugins
      Parameters:
      server - SubServer Name