Package games.stendhal.server.entity.player

Examples of games.stendhal.server.entity.player.Player.events()


    action.put("slot", "bag");
    action.put("item", "dagger");
    assertFalse(player.isEquipped("dagger"));
    CommandCenter.execute(player, action);
    // If the following fails, chances are quite good, the "items.xml" configuration file could not be loaded.
    assertTrue(player.events().isEmpty());
    assertTrue(player.isEquipped("dagger"));
    player.clearEvents();

    action = new RPAction();
    action.put("type", "summonat");
View Full Code Here


      admin.clearEvents();
      admin.setAdminLevel(5000);
      assertTrue(CommandCenter.execute(admin , action));
     
      transaction = TransactionPool.get().beginWork();
      System.out.println(admin.events().get(0).toString());
      assertFalse("banned".equals(accountDAO.getAccountStatus(transaction, player.getName())));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      assertThat(admin.events().get(0).toString(), containsString("[text=No such character]"));
View Full Code Here

     
      transaction = TransactionPool.get().beginWork();
      System.out.println(admin.events().get(0).toString());
      assertFalse("banned".equals(accountDAO.getAccountStatus(transaction, player.getName())));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      assertThat(admin.events().get(0).toString(), containsString("[text=No such character]"));
      assertThat(admin.events().get(0).toString(), containsString("[texttype=ERROR]"));
 
      // just undo the changes so the next test starts clean
View Full Code Here

      transaction = TransactionPool.get().beginWork();
      System.out.println(admin.events().get(0).toString());
      assertFalse("banned".equals(accountDAO.getAccountStatus(transaction, player.getName())));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      assertThat(admin.events().get(0).toString(), containsString("[text=No such character]"));
      assertThat(admin.events().get(0).toString(), containsString("[texttype=ERROR]"));
 
      // just undo the changes so the next test starts clean
      TransactionPool.get().rollback(transaction);
View Full Code Here

    action.put("target", "noone");
    action.put("slot", "bag");
    action.put("item", "dagger");

    CommandCenter.execute(player, action);
    assertEquals("Player \"noone\" not found.", player.events().get(0).get("text"));
    player.clearEvents();
  }
}
View Full Code Here

      System.out.println(admin.events().get(0).toString());
      assertFalse("banned".equals(accountDAO.getAccountStatus(transaction, player.getName())));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      assertThat(admin.events().get(0).toString(), containsString("[text=No such character]"));
      assertThat(admin.events().get(0).toString(), containsString("[texttype=ERROR]"));
 
      // just undo the changes so the next test starts clean
      TransactionPool.get().rollback(transaction);
    } catch (Throwable e) {
View Full Code Here

      assertFalse("banned".equals(accountDAO.getAccountStatus(transaction, player.getName())));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      assertThat(admin.events().get(0).toString(), containsString("[text=No such character]"));
      assertThat(admin.events().get(0).toString(), containsString("[texttype=ERROR]"));
 
      // just undo the changes so the next test starts clean
      TransactionPool.get().rollback(transaction);
    } catch (Throwable e) {
      TransactionPool.get().rollback(transaction);
View Full Code Here

      admin.clearEvents();
      admin.setAdminLevel(5000);
      assertTrue(CommandCenter.execute(admin , action));
     
      transaction = TransactionPool.get().beginWork();
      System.out.println(admin.events().get(0).toString());
      assertEquals("active", accountDAO.getAccountStatus(transaction, player.getName()));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      // not sure of a good way to reliably test the timestamping
View Full Code Here

     
      transaction = TransactionPool.get().beginWork();
      System.out.println(admin.events().get(0).toString());
      assertEquals("active", accountDAO.getAccountStatus(transaction, player.getName()));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      // not sure of a good way to reliably test the timestamping
      assertThat(admin.events().get(0).toString(), containsString("[text=You have banned account bobby (character: bobby) until "));
      assertThat(admin.events().get(0).toString(), containsString("for: We want to test the temporary bans"));
      assertThat(admin.events().get(0).toString(), containsString("[texttype=PRIVMSG]"));
View Full Code Here

      transaction = TransactionPool.get().beginWork();
      System.out.println(admin.events().get(0).toString());
      assertEquals("active", accountDAO.getAccountStatus(transaction, player.getName()));
      assertEquals("active", accountDAO.getAccountStatus(transaction, admin.getName()));
      assertFalse(admin.events().isEmpty());
      assertThat(admin.events().get(0).toString(), containsString("RPEvent private_text with Attributes of Class(private_text): "));
      // not sure of a good way to reliably test the timestamping
      assertThat(admin.events().get(0).toString(), containsString("[text=You have banned account bobby (character: bobby) until "));
      assertThat(admin.events().get(0).toString(), containsString("for: We want to test the temporary bans"));
      assertThat(admin.events().get(0).toString(), containsString("[texttype=PRIVMSG]"));
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.