Need Help figuring out how to make plugin!

Discussion in 'Plugin Development' started by DragsZombies, Sep 28, 2012.

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

    DragsZombies

    I am making a plugin for my friend that will have sub-chat channels. Kinda like how Mcmmo has the party chats. Anyway, I'm looking on where I could go, to find out how to code it for this. I just recently finished my first plugin, and I'm wanting to make another one. I appreciate all the help I can get. Thank you!



    DragsZombies
     
  2. Offline

    xXSniperzzXx_SD

    It would be something like this


    Code:
    StringBuilder message = new StringBuilder(args[0]);
                          for (int arg = 1; arg < args.length; arg++) {
                                  message.append(" ").append(args[arg]);}
    So that will get args[0] and any following args and make it into a string


    Code:
    for(Player online: getServer().getOnlinePlayers()){
      if(online.hasPermission(Perm node)){
          online.sendMessage(message);
      }
    }[CODE]
     This gets the online players, checks if they have a perm node, then sends them the string
     
  3. Offline

    DragsZombies

    Alright, I appreciate it :D Also, I want the channels to be easy to see, and not get confused with the actual chat.


    Thanks!


    EDIT:

    Also, what would I put for the start of it? Would I need to implement anything?
     
Thread Status:
Not open for further replies.

Share This Page