text question (probably a noob quistion...)

Discussion in 'Plugin Development' started by Westar777, Aug 17, 2011.

Thread Status:
Not open for further replies.
  1. i dont know how i can make that on a command in text the plugin respond
    example:
    i type : /basic
    server respones: bla bla bla blab bla


    please help

    Westar777

    server:
    upgamers.servegame.com
     
  2. Offline

    K900

    Code:
    getCommand("test").setExecutor(new CommandExecutor() {
                public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
                    commandSender.sendMessage("[Server] Konichiwa!");
                    return true;
                }
            });
    Put this into onEnable and that should be it.
     
  3. Offline

    Daniel Heppner

    A) you forgot ChatColor.Purple.
    B) <*Console> format is better, imo.
     
  4. Offline

    K900

    Well, that's a sample is it ;) It gets the whole thing through. Also, I prefer <*Console> for chats and [$plugin] for plugin messages

    @OP All chat colors are defined here: http://jd.bukkit.org/doxygen/d7/d06/ChatColor_8java.html

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
    Daniel Heppner likes this.
Thread Status:
Not open for further replies.

Share This Page