AutoRankup.java

1
package sh.okx.rankup;
2
3
import lombok.RequiredArgsConstructor;
4
import org.bukkit.Bukkit;
5
import org.bukkit.entity.Player;
6
import org.bukkit.scheduler.BukkitRunnable;
7
8
@RequiredArgsConstructor
9
public class AutoRankup extends BukkitRunnable {
10
  private final RankupPlugin rankup;
11
12
  @Override
13
  public void run() {
14 1 1. run : negated conditional → KILLED
    if (rankup.error()) {
15
      return;
16
    }
17
18
    RankupHelper helper = rankup.getHelper();
19
    for (Player player : Bukkit.getOnlinePlayers()) {
20 1 1. run : negated conditional → KILLED
      if (player.hasPermission("rankup.auto")) {
21 1 1. run : negated conditional → KILLED
        if (helper.checkRankup(player, false)) {
22 1 1. run : removed call to sh/okx/rankup/RankupHelper::rankup → KILLED
          helper.rankup(player);
23 2 1. run : negated conditional → NO_COVERAGE
2. run : negated conditional → NO_COVERAGE
        } else if (rankup.getPrestiges() != null && helper.checkPrestige(player, false)) {
24 1 1. run : removed call to sh/okx/rankup/RankupHelper::prestige → NO_COVERAGE
          helper.prestige(player);
25
        }
26
      }
27
    }
28
  }
29
}

Mutations

14

1.1
Location : run
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testAutoRankup()]
negated conditional → KILLED

20

1.1
Location : run
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testAutoRankup()]
negated conditional → KILLED

21

1.1
Location : run
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testAutoRankup()]
negated conditional → KILLED

22

1.1
Location : run
Killed by : sh.okx.rankup.RankupBasicsTest.[engine:junit-jupiter]/[class:sh.okx.rankup.RankupBasicsTest]/[method:testAutoRankup()]
removed call to sh/okx/rankup/RankupHelper::rankup → KILLED

23

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

2.2
Location : run
Killed by : none
negated conditional → NO_COVERAGE

24

1.1
Location : run
Killed by : none
removed call to sh/okx/rankup/RankupHelper::prestige → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.7.0