title: Bukkit How do I get a argument from a string?
body: <p>I'm trying to make a plugin that detects when people chat
  "#say " it will broadcast a message with those arguments.
  What I need to know is how to get arguments from a string.
  Please help. </p>
  
  <p><strong>Main:</strong></p>
  
  <pre><code>package com.gong.say;
  
  import org.bukkit.Bukkit;
  import org.bukkit.ChatColor;
  import org.bukkit.plugin.java.JavaPlugin;
  
  public class Main extends JavaPlugin{
      String sayMessage = ChatColor.GREEN + "Your message has been said!";
      public void onEnable()
      {
          Bukkit.getLogger().info("[BukkitAPIEnhancer] Plugin started!");
      Bukkit.getPluginManager().registerEvents(new ChatListener(this), this);
      }
      public void onDisable()
      {
          Bukkit.getLogger().info("[BukkitAPIEnhancer] Plugin disabled!");
      }
  
  }
  </code></pre>
  
  <p><strong>ChatListener:</strong></p>
  
  <pre><code>package com.gong.say;
  
  import org.bukkit.event.EventHandler;
  import org.bukkit.event.Listener;
  import org.bukkit.event.player.AsyncPlayerChatEvent;
  
  public class ChatListener implements Listener {
      Main plugin;
      public ChatListener(Main plugin)
      {
          this.plugin = plugin;
      }
      @EventHandler
      public void onChat(AsyncPlayerChatEvent e)
      {
          if(e.isAsynchronous())
          {
                  String message = e.getMessage();
              if(message.contains("#say"))
              {
                  //String[] args = Arguments after #say
                  //Bukkit.broadcastMessage(args);
              }
          }
      }
  }
  </code></pre>