Пример #1
0
 public boolean isBanned() {
   for (final BanRecord ban : this.getBans()) {
     if (ban.getState() == BanRecord.State.NORMAL) {
       return true;
     }
   }
   return false;
 }
Пример #2
0
 public BanRecord getActiveBan() {
   for (final BanRecord ban : this.getBans()) {
     if (ban.getState() == BanRecord.State.NORMAL) {
       return ban;
     }
   }
   return null;
 }