Development Assistance Screen Text?

Discussion in 'Plugin Help/Development/Requests' started by MrGriefer_HGTech, May 24, 2015.

Thread Status:
Not open for further replies.
  1. Hi!

    I saw a lot of servers when a player joins the server it will pop-up some text in the screen. Just like Hivemc or Mineplex:
    javaw 2015-05-24 12-04-26-43.png

    I am using this for my minigame plugin and i wanna do the same thing, but how?

    Thank you for reading and helping!
    ~Sorry for my bad english.
     
  2. Will you be using 1.8 or higher on this minigame?
     
  3. Yes!
     
  4. Online

    timtower Administrator Administrator Moderator

    Moved to Bukkit alternatives
     
  5. Offline

    sciolizer

    The feature is called titles, and you can trigger it with an ordinary command block.

    Code:
    /title @p title {text:"Hello!"}
    Dragnoz has a nice tool for generating the json of more complicated messages (e.g. involving color).

    Then just wire it up to the PlayerJoinEvent.
    Code:
    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "title " + event.getPlayer().getUniqueId() + " title {text:\"HiveMC\",color:aqua,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false,extra:[{text:\".\",color:dark_gray,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false,extra:[{text:\"EU\",color:green,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}]}]}");
        Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "title " + event.getPlayer().getUniqueId() + " subtitle {text:\"Stay Updated\",color:green,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false,extra:[{text:\": \",color:dark_gray,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false,extra:[{text:\"HiveMC.com!\",color:light_purple,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}]}]}");
    }
    
     
    CodePlaysMinecraft likes this.
Thread Status:
Not open for further replies.

Share This Page