Small formatting / warning or general improvements
This commit is contained in:
1 parent
07dc0cc6b6
commit
6a87885440
3 files changed
+6
-4
No files matched your search
@@ -43,9 +43,7 @@ public class KitMenu {
|
||||
}
|
||||
|
||||
public void open(Player p) {
|
||||
|
||||
menu.openMenu(p);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import java.io.*;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.planetgallium.kitpvp.Game;
|
||||
import org.bukkit.ChatColor;
|
||||
@@ -105,9 +106,12 @@ public class Resource extends YamlConfiguration {
|
||||
if (string != null) {
|
||||
string = ChatColor.translateAlternateColorCodes('&',
|
||||
string.replace("%prefix%", Game.getPrefix() == null ? "" : Game.getPrefix()));
|
||||
} else {
|
||||
string = "String not found";
|
||||
Toolkit.printToConsole(String.format("&7[&b&lKIT-PVP&7] &cString with path %s was not found.", path));
|
||||
}
|
||||
|
||||
return string;
|
||||
return string;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -381,7 +381,7 @@ public class Toolkit {
|
||||
|
||||
public static String translate(String s) {
|
||||
|
||||
return ChatColor.translateAlternateColorCodes('&', s);
|
||||
return ChatColor.translateAlternateColorCodes('&', s.replace("%prefix%", Game.getPrefix()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user