Exemple #1
0
 /**
  * Get the player job info for specific player
  *
  * @param player - the player who's job you're getting
  * @return the player job info of the player
  */
 public JobsPlayer getJobsPlayer(String playername) {
   JobsPlayer jPlayer = players.get(playername);
   if (jPlayer == null) {
     jPlayer = new JobsPlayer(plugin, playername);
     jPlayer.loadDAOData(plugin.getJobsCore().getJobsDAO().getAllJobs(jPlayer));
   }
   return jPlayer;
 }
Exemple #2
0
 /**
  * Handles join of new player
  *
  * @param playername
  */
 public void playerJoin(String playername) {
   synchronized (players) {
     JobsPlayer jPlayer = players.get(playername);
     if (jPlayer == null) {
       jPlayer = new JobsPlayer(plugin, playername);
       jPlayer.loadDAOData(plugin.getJobsCore().getJobsDAO().getAllJobs(jPlayer));
       players.put(playername, jPlayer);
     }
     jPlayer.onConnect();
     jPlayer.reloadHonorific();
     jPlayer.recalculatePermissions();
   }
 }