Resource Title / Subtitle sender

Discussion in 'Plugin Help/Development/Requests' started by gpotter2, May 14, 2015.

Thread Status:
Not open for further replies.
  1. TitleSender

    Hey !

    Here's my new API to send titles/subtitles to a player using reflections :D
    If you use it, it would be nice to put my name in the credits, and say it in this thread :)


    This api is using the DarkBlade12's Reflection Util class:

    Just add the 2 classes ( & to your plugin.


    The titles and subtitles are in the minecraft Chat JSON format !
    If you don't know how to use it, you may create them with the JSONString() function.

    You have 3 options to use the api:
    1. Send a title to a player
    2. Send a subtitle to a player
    3. Send a subtitle and a title to a player
    Other params will be needed:
    • fadeIn: the time in which the title/subtitle will appear in a fade effect.
    • stay: thie time in which the title/subtitle will stay on the screen.
    • fadeOut: the time in which the title/subtitle will disappear in a fade effect.
    Important note:
    The times are in ticks (1sec = 20ticks) !!!


    JsonString() is a function to combine the JSONPart text into a JSONString that you can send to the player. A JSONPart is customizable with a String, a color and you can add a font with setParam().



    Exemple to send Title and subtitle with JSONString:

    List<JSONPart> list = new LinkedList<JSONPart>();
      list.add(new JSONPart("Hey ", ChatColor.GREEN));
    list.add(new JSONPart("gpotter2", ChatColor.BLUE).setParam(JSONParam.BOLD, JSONParam.UNDERLINED));
      list.add(new JSONPart(" !", ChatColor.DARK_AQUA));
      List<JSONPart> list2 = new LinkedList<JSONPart>();
      list2.add(new JSONPart("How ", ChatColor.GREEN));
      list2.add(new JSONPart("are", ChatColor.BLUE));
      list2.add(new JSONPart("you !", ChatColor.DARK_AQUA));
      TitleSender.sendTitleAndSubTitle(player, TitleSender.JSONString(list), TitleSender.JSONString(list2), 10, 60, 10);
    Last edited: May 15, 2015
    seanliam2000 likes this.
  2. Offline

    timtower Administrator Administrator Moderator

    Moved to Bukkit alternatives
Thread Status:
Not open for further replies.

Share This Page