PlaceholderApiTextProcessor.java

1
package sh.okx.rankup.text;
2
3
import me.clip.placeholderapi.PlaceholderAPI;
4
import org.bukkit.Bukkit;
5
import org.bukkit.entity.Player;
6
7
public class PlaceholderApiTextProcessor implements TextProcessor {
8
9
  private final Player player;
10
11
  public PlaceholderApiTextProcessor(Player player) {
12
    this.player = player;
13
  }
14
15
  @Override
16
  public String process(String string) {
17 2 1. process : negated conditional → SURVIVED
2. process : negated conditional → KILLED
    if (player == null || !Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
18 1 1. process : replaced return value with "" for sh/okx/rankup/text/PlaceholderApiTextProcessor::process → KILLED
      return string;
19
    } else {
20 1 1. process : replaced return value with "" for sh/okx/rankup/text/PlaceholderApiTextProcessor::process → NO_COVERAGE
      return PlaceholderAPI.setPlaceholders(player, string);
21
    }
22
  }
23
}

Mutations

17

1.1
Location : process
Killed by : none
negated conditional → SURVIVED

2.2
Location : process
Killed by : sh.okx.rankup.pebble.PebbleTest.[engine:junit-jupiter]/[class:sh.okx.rankup.pebble.PebbleTest]/[method:testRequirementAbsent()]
negated conditional → KILLED

18

1.1
Location : process
Killed by : sh.okx.rankup.pebble.PebbleTest.[engine:junit-jupiter]/[class:sh.okx.rankup.pebble.PebbleTest]/[method:testRequirementAbsent()]
replaced return value with "" for sh/okx/rankup/text/PlaceholderApiTextProcessor::process → KILLED

20

1.1
Location : process
Killed by : none
replaced return value with "" for sh/okx/rankup/text/PlaceholderApiTextProcessor::process → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.7.0