Package games.stendhal.server.core.engine.dbcommand

Examples of games.stendhal.server.core.engine.dbcommand.ReadCharactersFromHallOfFameCommand


  public SignFromHallOfFameLoader(Sign sign, String introduction, String fametype, int max, boolean ascending, boolean lineBreaks) {
    this.sign = sign;
    this.introduction = introduction;
    this.handle = new ResultHandle();
    this.lineBreaks = lineBreaks;
    DBCommand command = new ReadCharactersFromHallOfFameCommand(fametype, max, ascending);
    DBCommandQueue.get().enqueueAndAwaitResult(command, handle);
  }
View Full Code Here


  }


  public void onTurnReached(int currentTurn) {
    // if there is no result, wait some more
    ReadCharactersFromHallOfFameCommand command = DBCommandQueue.get().getOneResult(ReadCharactersFromHallOfFameCommand.class, handle);
    if (command == null) {
      TurnNotifier.get().notifyInTurns(0, this);
      return;
    }

    // update the sign
    List<String> players = command.getNames();

    if (lineBreaks) {
      StringBuilder builder = new StringBuilder();
      Iterator<String> it = players.iterator();
        while (it.hasNext()) {
View Full Code Here

TOP

Related Classes of games.stendhal.server.core.engine.dbcommand.ReadCharactersFromHallOfFameCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.