Title Method

Discussion in 'Plugin Development' started by pablot802, Oct 22, 2015.

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

    pablot802

    I was searching up a little bit on how to send titles to players. I found that there are a few TitleAPIs to make it easier on developers. I also that the BukkitAPI lets me use this:

    Code:
    p.sendTitle(arg0, arg1);
    What is the best option for creating titles? If it is using the method provided by the BukkitAPI, what arguments am I suppose to pass?
     
  2. Offline

    mine-care

    It is using they method. Don't mess with mms unless you really have to.
    Check the docs for Player class and you will find the parameters :p
     
  3. Offline

    pablot802

    Code:
    sendTitle(String title, String subtitle)
    Ok thanks, couple more questions.

    I set the title and subtitle, but how do I set the duration? Fade in, fade out, etc...
    And if you were to create a title would you do it this way?
    @mine-care
     
  4. Offline

    mine-care

    @pablot802
    1. not sure how you can do that, never tried the titles with the api :p There should be a method, look at the docs.
    2. i would. Use nms only if you have to.
     
  5. Offline

    pablot802

    @mine-care

    I was looking at the docs and there only seems to be two methods for titles, resetTitle and sendTitle? Am I missing something?
     
  6. Offline

    boomboompower

  7. Offline

    pablot802

  8. Offline

    boomboompower

    @pablot802
    Yes, That code is for an API. Its not my plugin though, was just giving an example

    This is how it does fadeIn & fadeOut
    Code:
    public static void sendFullTitle(Player player, Integer fadeIn, Integer stay, Integer fadeOut, String title, String subtitle) {
    sendTitle(player, fadeIn, stay, fadeOut, title, subtitle);
    }
     
Thread Status:
Not open for further replies.

Share This Page