Creating Broadcast Plugin! | Need help!

Discussion in 'Plugin Development' started by filurp, Sep 27, 2012.

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

    filurp

    Hi i recently got into plugin development and i am looking to create my own broadcast Plugin. I really need help with this and full credit will be given to the person who helped me! If you are interested, add me on skype and we will talk more about it! ;)

    Skype: keiran.turner96
     
  2. Offline

    Sabersamus

    What exactly do you need help with?

    If you wanna broadcast something, use

    Bukkit.broadcast(Message, PermissionThePlayerHasToHaveInOrderToSeeIt);
    Or, Bukkit.broadcastMessage(Message); And everyone can see it
     
  3. Offline

    filurp

    I'm sorry but could you explain it a bit clearer please? [creeper]
     
  4. Offline

    Sabersamus

    Lets say you have a command, 'announce'

    Code:java
    1.  
    2. public boolean onCommand(CommandSender cs, Command cmd, String label, String[] args){
    3. if(cmd.getName().equalsIgnoreCase("announce"){
    4. if(args.length >= 1){
    5. StringBuilder sb = new StringBuilder();
    6. for(int i = 0; i < args.lenth; i++){
    7. sb.append(args[i] + " ");
    8. }
    9. if(cs instanceof Player){
    10. Player player =(Player)cs;
    11. if(player.hasPermission("permission"){
    12. Bukkit.broadcastMessage(player.getDisplayName() + ": " + sb.toSting().trim());
    13. }
    14. }else{
    15. Bukkit.broadcastMessage(sb.toString().trim());
    16. }
    17. }
    18. }
    19. return true;
    20. }
    21. [/i]
     
  5. Offline

    filurp

    Thank you! Do you have skype by any chance?:cool:
     
  6. Offline

    Sabersamus

    Posstanzibly
     
    chasechocolate likes this.
  7. Offline

    filurp

    Could you add me? keiran.turner96
     
Thread Status:
Not open for further replies.

Share This Page