title: Method does nothing if called within an if, if called directly from on event it works
body: <p>I`m building a discord bot with jda, made a method to use mXparser to get a math operation as an input from the chat e.g: /math 5+1
  wrote everything to get the message, separate the arguments from the input on the chat, everything works until I put the code inside an IF statement that checks if it actually starts with "/math", the code inside it uses mXparser to calculate everything and send it back to chat.</p>
  
  <p>Tried just about everything I could think of, taking all variables off the method, rewriting everything, I don`t get any errors either as stack trace or in the code editor, it just doesnt go through, tried just printing everything and it works fine as well, printing all the values on the console, everything seems to be right.</p>
  
  <p>This part is where I check for the message, get the Strings and trim everything</p>
  
  <pre class="lang-java prettyprint-override"><code>public void onMessageReceived(MessageReceivedEvent event) {
      this.messageReceived = event;
      this.prefix = Main.prefix;
  
      checkPrefix = messageReceived.getMessage().getContentRaw().split("\\s" + prefix);
      mainArg = checkPrefix[0];
      checkArgs = messageReceived.getMessage().getContentRaw().split(" ");
  
      callAllCommands();
  }
  </code></pre>
  
  <p>Here is the command to take the actual expression from the chat input calculate it and send it back.</p>
  
  <pre class="lang-java prettyprint-override"><code>private void mathCommand() {
      mathexp = new Expression(checkArgs[1]);
      messageReceived.getChannel().sendTyping().queue();
      essageReceived.getChannel().sendMessage(Double.toString(mathexp.calculate())).queue();      
  }
  </code></pre>
  
  <p>This is inside the <code>callAllCommands()</code> method, that is how it is supposed to work, if the command on the chat is <code>/math</code> then the expression e.g: <code>/math 1+1</code> it will send the result back, if I take off the IF statement it works just fine but then I can't check for the command. The other commands do work fine with the IF statement</p>
  
  <pre class="lang-java prettyprint-override"><code>if (mainArg.contentEquals(prefix + "math")) {
      mathCommand();
  }
  </code></pre>
  
  <p>I don't really get any errors, it just does not work, sorry if I missed something really simple, i`m not that experienced yet.</p>