Beispiel #1
0
 /**
  * Loads a player using specified data.
  *
  * @param player the player to load
  * @param chances amount of chances left
  * @param name name of the category
  * @param paused is the test paused or not
  */
 public void loadTest(Player player, int chances, String name, boolean paused) {
   this.chances.put(player.getUniqueId(), chances);
   if (paused) {
     this.paused.add(player.getUniqueId());
   } else {
     for (Category category : categories) {
       if (category.getName().equals(name)) {
         players.put(player.getUniqueId(), category);
         category.loadPlayer(player);
         return;
       }
     }
   }
 }