7.5
This commit is contained in:
@@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class Replace {
|
||||
@@ -37,10 +38,10 @@ public class Replace {
|
||||
public static List<String> replace(String prefix,Player player, List<String> Text) {
|
||||
List<String> output = new ArrayList();
|
||||
if (player == null) {
|
||||
return Arrays.asList("player is null");
|
||||
return Collections.singletonList("player is null");
|
||||
}
|
||||
if (Text == null) {
|
||||
return Arrays.asList("Text is null");
|
||||
return Collections.singletonList("Text is null");
|
||||
}
|
||||
for (String input : Text) {
|
||||
output.add(PlaceholderAPI.setPlaceholders(player, input.replace("[prefix]", prefix).replace("&", "§")
|
||||
@@ -51,8 +52,8 @@ public class Replace {
|
||||
}
|
||||
|
||||
|
||||
public static List replacePrice(String prefix,List<String> Text, String price) {
|
||||
List rp = new ArrayList();
|
||||
public static List<String> replacePrice(String prefix,List<String> Text, String price) {
|
||||
List<String> rp = new ArrayList();
|
||||
for (String s : Text) {
|
||||
rp.add(s.replace("[prefix]", prefix).replace("&", "§")
|
||||
.replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö")
|
||||
@@ -63,8 +64,8 @@ public class Replace {
|
||||
}
|
||||
|
||||
|
||||
public static List replacePrice(String prefix,Player player, List<String> Text, String price) {
|
||||
List rp = new ArrayList();
|
||||
public static List<String> replacePrice(String prefix,Player player, List<String> Text, String price) {
|
||||
List<String> rp = new ArrayList();
|
||||
for (String s : Text) {
|
||||
rp.add(PlaceholderAPI.setPlaceholders(player, s.replace("[prefix]", prefix).replace("&", "§")
|
||||
.replace("[ue]", "ü").replace("[UE]", "Ü").replace("[oe]", "ö")
|
||||
|
Reference in New Issue
Block a user