Don't do things with the check API if they are already done

This commit is contained in:
H31IX committed 2012-06-23 15:10:00 -04:00
1 parent 447ac6bdec
commit 81378d3b54
1 file changed
+6
@@ -53,11 +53,14 @@ public class CheckManager
} }
public void deactivateCheck(CheckType type) public void deactivateCheck(CheckType type)
{
if (!checkIgnoreList.contains(type))
{ {
manager.log("The " + type.toString() + " check was deactivated."); manager.log("The " + type.toString() + " check was deactivated.");
checkIgnoreList.add(type); checkIgnoreList.add(type);
disabled++; disabled++;
} }
}
public boolean isActive(CheckType type) public boolean isActive(CheckType type)
{ {
@@ -65,11 +68,14 @@ public class CheckManager
} }
public void exemptPlayer(Player player, CheckType type) public void exemptPlayer(Player player, CheckType type)
{
if (!exemptList.containsEntry(player.getName(), type))
{ {
manager.log(player.getName() + " was exempted from the " + type.toString() + " check."); manager.log(player.getName() + " was exempted from the " + type.toString() + " check.");
exemptList.put(player.getName(), type); exemptList.put(player.getName(), type);
exempt++; exempt++;
} }
}
public void unexemptPlayer(Player player, CheckType type) public void unexemptPlayer(Player player, CheckType type)
{ {