Debug PAPI

This commit is contained in:
Ka0rX 2022-08-27 15:22:27 +02:00
parent 90ee0c37bb
commit 4c7e0cac5c

View File

@ -95,10 +95,16 @@ public class ClassSkill implements CooldownObject {
} }
private String applyPlaceholders(Map<String, String> placeholders, String str) { private String applyPlaceholders(Map<String, String> placeholders, String str) {
while (str.contains("{") && str.substring(str.indexOf("{")).contains("}")) { String explored = str;
String holder = str.substring(str.indexOf("{") + 1, str.indexOf("}")); while (explored.contains("{") && explored.substring(explored.indexOf("{")).contains("}")) {
final int begin = explored.indexOf("{"), end = explored.indexOf("}");
String holder = explored.substring(begin + 1, end);
if (placeholders.containsKey(holder)) if (placeholders.containsKey(holder))
str = str.replace("{" + holder + "}", placeholders.get(holder)); str = str.replace("{" + holder + "}", placeholders.get(holder));
// Increase counter
explored = explored.substring(end + 1);
} }
return str; return str;
} }