How to add more text

Discussion in 'Plugin Development' started by 99storm2, Feb 27, 2013.

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

    99storm2

    im making a plugin to list my ranks and permissions that it has
    i need it to do this
    command:
    /{rank name}
    What it will say to you:
    {rank name}
    {command}
    {command}
    {command}
    how do i make it so it will tell you more lines of text i can get it to say the first line but i cant add more
     
  2. Offline

    Rprrr

    Code:
    p.sendMessage("Like");
    p.sendMessage("this");
    p.sendMessage("?);
    p.sendMessage("Or is that not what you mean?");
     
  3. Offline

    99storm2

    ya i think thats what i want
    Yeah i think thats what i want ill test it thanks

    Code:
    package me.storm2.newtest;
     
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class main extends JavaPlugin{
       
        @Override
        public void onEnable(){
           
        }
       
        @Override
        public void onDisable(){
           
        }
       
        public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
            if(commandLabel.equalsIgnoreCase("test")){
                sender.sendMessage(ChatColor.BLUE+"This is my test message");
                sender.sendMessage(ChatColor.RED+"testing 2nd line");
            }
            return false;
        }
     
    }
    
    This is what i want to do when they run the command test i want it to say
    This is my test message
    testing 2nd line

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

Share This Page