9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2025-12-25 18:09:20 +00:00
This commit is contained in:
Xiao-MoMi
2022-06-22 17:36:38 +08:00
parent a7f98de21e
commit a9a02a3eaa
12 changed files with 8 additions and 11 deletions

View File

@@ -149,7 +149,7 @@ public class ConfigManager {
idle_timeout = databaseConfig.getInt("Pool-Settings.idle-timeout");
}
}else {
AdventureManager.consoleMessage("这种存储方式不存在");
AdventureManager.consoleMessage("<red>[CustomNameplates] Error! No such storage mode!</red>");
Bukkit.getPluginManager().disablePlugin(CustomNameplates.instance);
}
}

View File

@@ -6,7 +6,7 @@ public record FontCache(String name, FontChar fontChar, NameplateConfig config)
public static FontCache EMPTY;
static {
FontCache.EMPTY = new FontCache("none", new FontChar(' ', ' ', ' '), NameplateConfig.EMPTY);
FontCache.EMPTY = new FontCache("none", new FontChar('', '', ''), NameplateConfig.EMPTY);
}
public String getName() {

View File

@@ -27,7 +27,7 @@ public enum FontWidth {
RIGHT_ARROW('>', 4), QUESTION_MARK('?', 5), SLASH('/', 5),
BACK_SLASH('\\', 5), LINE('|', 1), TILDE('~', 5), TICK('`', 2),
PERIOD('.', 1), COMMA(',', 1), SPACE(' ', 3),
IN_BETWEEN(' ', 1), DEFAULT('默', 8), DEFAULT2('米', 7);
IN_BETWEEN(' ', 1), DEFAULT('默', 8);
private final char character;
private final int length;

View File

@@ -111,7 +111,7 @@ public class ResourceManager {
return;
}
//资源包生成成功提示
AdventureManager.consoleMessage("<gradient:#DDE4FF:#8DA2EE>[CustomNameplates]</gradient> <color:#F5F5F5>Resource pack has been successfully generated! <color:#3CB371>" + this.caches.size() + " <color:#F5F5F5>nameplates Loaded.");
AdventureManager.consoleMessage("<gradient:#DDE4FF:#8DA2EE>[CustomNameplates]</gradient> <color:#F5F5F5>Resource pack has been successfully generated! <color:#3CB371>" + (this.caches.size() -1) + " <color:#F5F5F5>nameplates Loaded.");
if (this.plugin.getHookManager().hasItemsAdder()){
try{
FileUtils.copyDirectory(g_file, new File(Bukkit.getPluginManager().getPlugin("ItemsAdder").getDataFolder() + File.separator + "data"+ File.separator + "resource_pack" + File.separator + "assets") );
@@ -126,7 +126,7 @@ public class ResourceManager {
保存插件预设资源
*/
private void saveDefaultResources() {
List<String> list = Arrays.asList("cat", "egg", "cheems", "wither");
List<String> list = Arrays.asList("cat", "egg", "cheems", "wither", "xmas", "halloween","hutao","starsky","trident","rabbit");
list.forEach(name -> CustomNameplates.instance.saveResource("resources" + File.separatorChar + name + ".png", false));
}
@@ -168,7 +168,7 @@ public class ResourceManager {
config.set("color","WHITE");
}
if (!config.contains("size")){
config.set("size", 12);
config.set("size", 16);
}
ChatColor color = ChatColor.WHITE;
try {