Exemple #1
0
  public void force(int id) {
    if (id < 0 || id >= messages.size()) return;

    String message = StringUtils.format(PUB_MESSAGE_FORMAT, messageColor, messages.get(id));

    world.systemMessage(new SystemMessageEvent(message));
  }
Exemple #2
0
  @Override
  public void actionPerformed(ActionEvent e) {
    String message =
        StringUtils.format(PUB_MESSAGE_FORMAT, messageColor, messages.get(currentMessage));

    world.systemMessage(new SystemMessageEvent(message));

    ++currentMessage;
    if (currentMessage >= configuration.getPubMessages().length) {
      currentMessage = 0;
    }
  }