| 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 2.2 |
|
| 18 |
1.1 |
|
| 20 |
1.1 |