Solved How to print a message on minecraft gui

Discussion in 'Plugin Help/Development/Requests' started by Kilorbine, Mar 12, 2015.

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

    Kilorbine

    Hi everyone!

    I'm new in minecraft pluggin dev, and even in Java dev, so maybe for you it's an obvious answer but...
    I'm currently trying to print some information on Mnecraft GUI (client side) and I don't know how to do :/

    I've search a lot (tuto, apiDocs) but i see nothing that let me think I can do it.

    Exept the fact that I already see this in game

    2015-03-12_15.21.00.png
    As you can see, there is a big "D├ębut du jeux dans 10 seconde" and at the right, a little square with some information.

    How can I do that?
    Just a little help to make me pass this?

    Thx :)
     
  2. Offline

    timtower Moderator Moderator

  3. @Kilorbine The big message is a 1.8 only feature. The text on the side is called a scoreboard. I'm sure if you do some research you'll find some amazing tutorials. Welcome to Bukkit by the way.
     
  4. Offline

    UniqueNameDen

    Bukkit doesn't have an API for that you need to use packets
    Code:java
    1.  
    2. public void setTitle(Player player, String Message) {
    3. CraftPlayer p = (CraftPlayer) player;IChatBaseComponent icbc = ChatSerializer.a("{\"text\": \"" + Message + "\"}");PacketPlayOutTitle bar = PacketPlayOutTitle(icbc, (byte)0);p.getHandle().playerConnection.sendPacket(bar);}
    4.  

    I'm not sure if its PacketPlayOutTitle didn't test it
     
  5. Offline

    Kilorbine

    Thx all for your messages :)

    @CodePlaysMinecraft yes, I've seen many time the scoreboard feature but I was thinking it was like a questbook.
    thx for the welcome ;)
    Btw, i'm under 1.8.3 (bukkit 1.8.3, snapshoot shaded)

    Do you know if it exist a webpage referencing every action possible with packet (like here, the big title?)
     
  6. Offline

    timtower Moderator Moderator

  7. Offline

    Kilorbine

    Oh, my god!
    the holy grail!
    @timtower, thx a lot :)
     
Thread Status:
Not open for further replies.

Share This Page