Server Broadcast Code

Discussion in 'Plugin Development' started by ShadeSlaughter, Aug 25, 2013.

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

    ShadeSlaughter

    Hello, I only just started making Plugins today and I am only making them for my server at the moment so I do not mess up anyone else's, but I tried creating a Plugin that adds a custom Broadcast, and it all works 100%.

    The plugin loads, commands work, descriptions available but the way I set the command does not work to how I thought it would?

    Here is the whole section of code for the one command.

    It would be highly appreciated due to the fact it comes out looking like this:
    [​IMG]


    Thank you in advanced, ShadeSlaughter.
     
  2. Offline

    Trevor1134

    Just use ChatColor.<COLOR>
     
  3. Offline

    ShadeSlaughter

    Thank you :) What do I now do about the Message bit?
     
  4. Offline

    Compressions

  5. Offline

    ShadeSlaughter

  6. Offline

    Afridge1O1

    Code:java
    1. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    2. if(cmd.getName().equalsIgnoreCase("divinebc")){
    3. Bukkit.broadcastMessage(ChatColor.BLACK + "|" + ChatColor.GRAY + "DivineMC" + ChatColor.BLACK + "|" + ChatColor.GOLD + args);
    4. return true;
    5. }
    6. return false;
    7. }


    I'm pretty sure that would work :p
     
Thread Status:
Not open for further replies.

Share This Page