title: Bukkit - Check if a player sends a chat message containing an initialised double
body: <p>Basically, I'm quite new to Java &amp; Bukkit in general so please don't hate me if I'm doing something stupid. So basically the following code is my command base:</p>
  
  <pre><code>double numberEnd = Double.parseDouble(args[1]);
  double random = new Random().nextDouble();
  double result = numberStart + (random * (numberEnd - numberStart));
  theSender.sendMessage(ChatColor.GREEN + "[Giveaway] + ChatColor.AQUA + "The winning number is " + result)
  Bukkit.broadcastMessage(ChatColor.GREEN + (ChatColor.BOLD + "A giveaway has begun ranging from 0 - " + numberEnd));
  Player winningPlayer;
  </code></pre>
  
  <p>So I want the plugin to realise when a player says the (result) and forward another broadcast saying that the (player) is the winner. Now, I don't quite know the exact approach but could I create the following method and call it in my code?</p>
  
  <pre><code>public void onPlayerChat(AsyncPlayerChatEvent winningPlayer) {
      if (winningPlayer.getMessage().contains(result)) {
          Bukkit.broadcastMessage(winningPlayer.getPlayer() + ChatColor.GREEN + " has won!");
      }
  }
  </code></pre>
  
  <p>Or is there an easier and more simple approach that I'm blindly missing?
  Would appreciate any help, thanks!</p>