| 1 | package sh.okx.rankup.text; | |
| 2 | ||
| 3 | import java.util.ArrayList; | |
| 4 | import java.util.List; | |
| 5 | import java.util.Map; | |
| 6 | import java.util.logging.Logger; | |
| 7 | import org.bukkit.entity.Player; | |
| 8 | import org.jetbrains.annotations.Nullable; | |
| 9 | import sh.okx.rankup.placeholders.Placeholders; | |
| 10 | import sh.okx.rankup.text.pebble.PebbleTextProcessor; | |
| 11 | ||
| 12 | public class TextProcessorBuilder { | |
| 13 | ||
| 14 | private final List<TextProcessor> processors = new ArrayList<>(); | |
| 15 | ||
| 16 | public TextProcessorBuilder colour() { | |
| 17 | processors.add(new ColourTextProcessor()); | |
| 18 |
1
1. colour : replaced return value with null for sh/okx/rankup/text/TextProcessorBuilder::colour → KILLED |
return this; |
| 19 | } | |
| 20 | ||
| 21 | public TextProcessorBuilder pebble(Logger logger, Map<String, Object> context, Placeholders options) { | |
| 22 | processors.add(new PebbleTextProcessor(logger, context, options)); | |
| 23 |
1
1. pebble : replaced return value with null for sh/okx/rankup/text/TextProcessorBuilder::pebble → KILLED |
return this; |
| 24 | } | |
| 25 | ||
| 26 | public TextProcessorBuilder papi(@Nullable Player player) { | |
| 27 | processors.add(new PlaceholderApiTextProcessor(player)); | |
| 28 |
1
1. papi : replaced return value with null for sh/okx/rankup/text/TextProcessorBuilder::papi → KILLED |
return this; |
| 29 | } | |
| 30 | ||
| 31 | public TextProcessorBuilder legacy(Map<String, Object> context, Placeholders options) { | |
| 32 | processors.add(new LegacyTextProcessor(context, options)); | |
| 33 |
1
1. legacy : replaced return value with null for sh/okx/rankup/text/TextProcessorBuilder::legacy → KILLED |
return this; |
| 34 | } | |
| 35 | ||
| 36 | public TextProcessor create() { | |
| 37 |
1
1. create : replaced return value with null for sh/okx/rankup/text/TextProcessorBuilder::create → KILLED |
return new ChainedTextProcessor(processors.toArray(new TextProcessor[0])); |
| 38 | } | |
| 39 | } | |
Mutations | ||
| 18 |
1.1 |
|
| 23 |
1.1 |
|
| 28 |
1.1 |
|
| 33 |
1.1 |
|
| 37 |
1.1 |