Skip to content

Commit 425b315

Browse files
committed
Revert "Update ToolStats.java"
This reverts commit f2739cf.
1 parent 50a0bc8 commit 425b315

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

src/main/java/lol/hyper/toolstats/ToolStats.java

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,30 @@ public String getLoreFromConfig(String configName, boolean raw) {
236236
// this is a dirty trick to remove color codes
237237
lore = ChatColor.translateAlternateColorCodes('&', lore);
238238
lore = ChatColor.stripColor(lore);
239-
lore = lore.replace("{player}", "");
240-
lore = lore.replace("{date}", "");
241-
lore = lore.replace("{name}", "");
242-
lore = lore.replace("{kills}", "");
243-
lore = lore.replace("{blocks}", "");
244-
lore = lore.replace("{sheep}", "");
245-
lore = lore.replace("{damage}", "");
246-
lore = lore.replace("{fish}", "");
239+
if (lore.contains("{player}")) {
240+
lore = lore.replace("{player}", "");
241+
}
242+
if (lore.contains("{date}")) {
243+
lore = lore.replace("{date}", "");
244+
}
245+
if (lore.contains("{name}")) {
246+
lore = lore.replace("{name}", "");
247+
}
248+
if (lore.contains("{kills}")) {
249+
lore = lore.replace("{kills}", "");
250+
}
251+
if (lore.contains("{blocks}")) {
252+
lore = lore.replace("{blocks}", "");
253+
}
254+
if (lore.contains("{sheep}")) {
255+
lore = lore.replace("{sheep}", "");
256+
}
257+
if (lore.contains("{damage}")) {
258+
lore = lore.replace("{damage}", "");
259+
}
260+
if (lore.contains("{fish}")) {
261+
lore = lore.replace("{fish}", "");
262+
}
247263
}
248264
return lore;
249265
}

0 commit comments

Comments
 (0)