Broadcast Coords

Discussion in 'Archived: Plugin Requests' started by superj, Sep 24, 2013.

  1. Offline

    superj

    Basically this plugin broadcasts a players coordinates using a command, for example I would type /coord <player> and it would say in chat (a customized message) with %p as the player variable and %c as the players coords.

    So maybe something like:
    SuperJ is at: 359 7090
    The config code would be:
    %p is at: %c

    Colors would also be nice to have :) such as all of the &'s
     
  2. Offline

    bryansolis13

    Ill give it go just give me 2 - 3 days Since i have school
     
  3. Offline

    AndyMcB1

    Is that X and Z?
     
  4. Offline

    bryansolis13

    AndyMcB1 likes this.
  5. Offline

    superj

  6. Offline

    jakeyray18

    superj I believe the /whois command may show the users coordinates but did you want it to broadcast it into chat so everyone can see it or just for the user who uses the command to see it?
     
  7. Offline

    superj

    I would like it to broadcast it in chat, without a prefix or anything just a simple broadcast that I can customize. All players will see it. Basically it is for a server idea that is disclosed atm :p
     
  8. Offline

    Freelix2000

    I could program a plugin like this in my sleep. The only flaw might be that you will have to use § for color codes instead of &, but it will still have the same power, just a tiny inconvenience. I can also make 3 commands, one for broadcasting it to the server, one for just telling the command sender, and one for telling a specified player cords to the first specified player. I will start as soon as I get a reply.
     
  9. Offline

    BillyGalbreath

  10. Offline

    Freelix2000

    aww... I wanted to make it first. D:
     
  11. Offline

    AndyMcB1

     
    timtower likes this.
  12. Online

    timtower Administrator Administrator Moderator

    AndyMcB1 Apparently he didn't do that :p
     
  13. Offline

    AndyMcB1

    For easy plugins round here you gotta get in quick!
     
    timtower likes this.
  14. Offline

    Freelix2000

    :p Yeah, I learned my lesson. Next time I'll upload it with my first reply instead of bumping the post for somebody else to do it first. :p
     
    timtower likes this.
  15. Offline

    BillyGalbreath

    This is how I do it with & instead of §:

    Code:
    public String colorize(String str) {
    return str.replaceAll("(?i)&([a-f0-9k-or])", "\u00a7$1");
    }
    
    There are other ways that do not require regex, but I've been doing it this way for years and old habits die hard :p
     
  16. Offline

    Freelix2000

    Okay, thanks!
     

Share This Page