예제 #1
0
 public void removePenalty(Penalty penalty, Player player) {
   if (Penalty.BAN == penalty.getType()) {
     player.setBanInfo(null);
   }
   penalty.setActive(false);
   penaltyDAO.save(penalty);
   checkNoticeStatus(penalty, player);
 }
예제 #2
0
 public void addPenalty(Penalty penalty, Player player) {
   if (Penalty.BAN == penalty.getType()) {
     player.setBanInfo(penalty.getCreated());
   }
   penalty.setActive(true);
   penaltyDAO.save(penalty);
   checkNoticeStatus(penalty, player);
 }
예제 #3
0
 public void checkNoticeStatus(Penalty penalty, Player player) {
   if (Penalty.NOTICE == penalty.getType()) {
     Penalty note = penaltyDAO.findLastActivePenalty(player.getKey(), Penalty.NOTICE);
     if (note == null) {
       player.setNote(null);
     } else {
       player.setNote(note.getCreated());
     }
   }
 }