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 WorldRequirement extends Requirement { | |
8 | public WorldRequirement(RankupPlugin plugin) { | |
9 | super(plugin, "world"); | |
10 | } | |
11 | ||
12 | protected WorldRequirement(Requirement clone) { | |
13 | super(clone); | |
14 | } | |
15 | ||
16 | @Override | |
17 | public boolean check(Player player) { | |
18 | String[] worlds = getValuesString(); | |
19 |
2
1. check : changed conditional boundary → NO_COVERAGE 2. check : negated conditional → NO_COVERAGE |
for (String world : worlds) { |
20 |
2
1. check : replaced boolean return with false for sh/okx/rankup/requirements/requirement/WorldRequirement::check → NO_COVERAGE 2. check : replaced boolean return with true for sh/okx/rankup/requirements/requirement/WorldRequirement::check → NO_COVERAGE |
return player.getWorld().getName().equalsIgnoreCase(world); |
21 | } | |
22 |
1
1. check : replaced boolean return with true for sh/okx/rankup/requirements/requirement/WorldRequirement::check → NO_COVERAGE |
return false; |
23 | } | |
24 | ||
25 | @Override | |
26 | public double getTotal(Player player) { | |
27 |
1
1. getTotal : replaced double return with 0.0d for sh/okx/rankup/requirements/requirement/WorldRequirement::getTotal → NO_COVERAGE |
return 1; |
28 | } | |
29 | ||
30 | @Override | |
31 | public Requirement clone() { | |
32 |
1
1. clone : replaced return value with null for sh/okx/rankup/requirements/requirement/WorldRequirement::clone → NO_COVERAGE |
return new WorldRequirement(this); |
33 | } | |
34 | } | |
Mutations | ||
19 |
1.1 2.2 |
|
20 |
1.1 2.2 |
|
22 |
1.1 |
|
27 |
1.1 |
|
32 |
1.1 |