Development Assistance Using the title command?

Discussion in 'Plugin Help/Development/Requests' started by jvjv88, Jan 12, 2015.

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

    jvjv88

    I want to show the title command when a player joins... I have this so far:
    Code:
    public void onPlayerJoin(PlayerJoinEvent evt) {
            Player yolo = evt.getPlayer(); // The player who joined
            getServer().dispatchCommand(getServer().getConsoleSender(), String.format("title %s title {text:"By: Javeh",color:dark_blue,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false,extra:[{text:"",color:dark_blue,bold:false,underlined:false,italic:false,strikethrough:false,obfuscated:false}]} ", yolo);
         
    there are too many quotes in title and eclipse is throwing out errors. Anyone know how to solve this?
     
  2. Offline

    Skionz

    @jvjv88 Use \" for nested quotes. Or you could easily just send packets.
     
  3. Online

    timtower Administrator Administrator Moderator

    Moved to Bukkit alternatives
     
  4. Offline

    jvjv88

    I'm new to this. How do I send "Packets"?
     
  5. Offline

    Skionz

    @jvjv88 There are plenty of tutorials.
     
  6. Offline

    jvjv88

    @Skionz link please? (I'm really lost with this sorry)
     
  7. Offline

    pie_flavor

    @jvjv88 You don't actually need every single field filled out, just the ones that you change from default.
    Code:
    public void onPlayerJoin(PlayerJoinEvent evt) {
            getServer().dispatchCommand(getServer().getConsoleSender(), "title "+evt.getPlayer().getName() + " title {text:\"By Javeh\",color:dark_blue}
     
Thread Status:
Not open for further replies.

Share This Page