code: public void addMessage(String message, int x, int y, long time)
      {
          messages.add(new MessageData(message, x, y, time));
          hasMessage = true;
      }
docs: Add a timed message.
  
  @param message The message string.
  @param x The horizontal location.
  @param y The vertical location.
  @param time The remaining time.