Broadcast message

Discussion in 'Plugin Development' started by WolfMaster, Sep 14, 2012.

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

    WolfMaster

    How do i make it so the broadcast message says *Display Name* Has Tried Placing TNT

    instead of *DisplayName*Has Tried Placing TNT,

    here is an example of what i mean

    My code is
    Code:
    Bukkit.broadcastMessage(ChatColor.RED + (player.getDisplayName () + "Has Tried To Place TNT!"));
    2012-09-14_21.04.24.png
     
  2. Offline

    kyle1320

    Add a space before "Has" so it's " Has"
     
    WolfMaster likes this.
  3. Offline

    Assult

    What do you mean by *display name* and not *displayname*?
     
  4. Offline

    asb1230

    Code:
    Bukkit.broadcastMessage(ChatColor.RED + (player.getDisplayName () + " Has Tried To Place TNT!"));
     
    WolfMaster likes this.
  5. Offline

    ZackBlazes

    Add a space before "has"
     
  6. Offline

    Gater12

    ZackBlazes
    Don't necro a thread, especially if it's over about 2 years, the question has been answered, and/or the OP hasn't been on in the last few months.
     
    Xp10d3 likes this.
  7. Offline

    ZackBlazes

  8. Offline

    Gater12

    ZackBlazes
    Don't bump an old thread that has already been solved.
     
  9. Offline

    ZackBlazes

    Gater12 Ok there was no solved tag and the creator of the thread never replied so I figured it wasn't solved. Thanks for the advice.
     
  10. Offline

    iiHeroo


    One way to assume it:

    If the OP doesn't come back and says they have an issue still, it means he probably fixed it, especially when the thread is about 1 and half years old.
     
    Xp10d3 likes this.
  11. Offline

    MrAwellstein

    Code:
    (player.getDisplayName () + "Has Tried To Place TNT!")
    should be
    Code:
    player.getDisplayName () + "Has Tried To Place TNT!"
    and
    Code:
    "Has
    should be
    Code:
    " Has
     
  12. Offline

    Gerka

    Here you go

    You better use ChatColor.DARK_RED

    Bukkit.broadcastMessage(ChatColor.RED + event.getPlayer().getName() + "Has Tried To Place TNT!");:rolleyes:
     
Thread Status:
Not open for further replies.

Share This Page