Color problems

Discussion in 'Plugin Development' started by jjacobson, Nov 29, 2012.

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

    jjacobson

    Im trying to make a simple plugin that broadcasts the end of an arena with mob arena. Its all working fine, but when I try and add color to the message, it just stays with the same green color that mob arena uses. Im guessing because the getArena() comes with the green color or something?

    How can I make it so the entire message isnt green, im EXTREMELY new to java, and even more new to bukkit (I only wrote this plugin by watching youtube and looking at other plugins)


    Code:
          }
          @EventHandler
          public void onMobArenaEnd(ArenaEndEvent e) {
            e.getArena();
            Bukkit.getServer().broadcastMessage(ChatColor.RED + "" + e.getArena() + ChatColor.GREEN + " Messsage here");   
            {
     
  2. Offline

    ZeusAllMighty11

    Maybe you can't broadcast 'e.getArena()', try e.getArena().getName() so it returns a string. Not sure how MobArena API works.
     
  3. Offline

    jjacobson

    It works to broadcast, just doesnt show any colors except the default mob arena green color.
     
  4. Offline

    ZeusAllMighty11

    Try
    @EventHandler(priority = Priority.LOWEST)


    This will override all other arena ending events to do your code first
     
  5. Offline

    jjacobson

    I tried this @EventHandler(priority = EventPriority.LOWEST)

    And this @EventHandler(priority = EventPriority.HIGHEST)

    Neither changed the color of the chat message, it is still green.
     
Thread Status:
Not open for further replies.

Share This Page