GroupRequirement.java

1
package sh.okx.rankup.requirements.requirement;
2
3
import org.bukkit.entity.Player;
4
import sh.okx.rankup.RankupPlugin;
5
import sh.okx.rankup.requirements.Requirement;
6
7
public class GroupRequirement extends Requirement {
8
  public GroupRequirement(RankupPlugin plugin) {
9
    super(plugin, "group");
10
  }
11
12
  protected GroupRequirement(Requirement clone) {
13
    super(clone);
14
  }
15
16
  @Override
17
  public boolean check(Player player) {
18
    for (String group : getValuesString()) {
19 1 1. check : negated conditional → NO_COVERAGE
      if (plugin.getPermissions().inGroup(player.getUniqueId(), group)) {
20 1 1. check : replaced boolean return with false for sh/okx/rankup/requirements/requirement/GroupRequirement::check → NO_COVERAGE
        return true;
21
      }
22
    }
23 1 1. check : replaced boolean return with true for sh/okx/rankup/requirements/requirement/GroupRequirement::check → NO_COVERAGE
    return false;
24
  }
25
26
  @Override
27
  public Requirement clone() {
28 1 1. clone : replaced return value with null for sh/okx/rankup/requirements/requirement/GroupRequirement::clone → NO_COVERAGE
    return new GroupRequirement(this);
29
  }
30
}

Mutations

19

1.1
Location : check
Killed by : none
negated conditional → NO_COVERAGE

20

1.1
Location : check
Killed by : none
replaced boolean return with false for sh/okx/rankup/requirements/requirement/GroupRequirement::check → NO_COVERAGE

23

1.1
Location : check
Killed by : none
replaced boolean return with true for sh/okx/rankup/requirements/requirement/GroupRequirement::check → NO_COVERAGE

28

1.1
Location : clone
Killed by : none
replaced return value with null for sh/okx/rankup/requirements/requirement/GroupRequirement::clone → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.7.0