9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2026-01-04 15:31:47 +00:00

1.8.0-PRE-2

This commit is contained in:
Xiao-MoMi
2022-07-29 12:19:56 +08:00
parent f6a6508c95
commit 55de5f1589
7 changed files with 18 additions and 10 deletions

View File

@@ -104,6 +104,9 @@ public class ConfigManager {
player_prefix = config.getString("config.prefix");
player_suffix = config.getString("config.suffix");
anotherFont = config.getBoolean("config.another-ascii-font.enable",true);
if(config.getBoolean("config.extract-shader",true)){
CustomNameplates.instance.saveResource("shaders.zip", true);
}
itemsAdder = config.getBoolean("config.integrations.ItemsAdder",false);
fontOffset = config.getInt("config.another-ascii-font.y-offset",3);
@@ -127,8 +130,6 @@ public class ConfigManager {
if(CustomNameplates.instance.getServer().getPluginManager().getPlugin("TAB") == null){
tab = false;
CustomNameplates.instance.getLogger().warning("Failed to initialize TAB!");
}else {
AdventureManager.consoleMessage("<gradient:#2E8B57:#48D1CC>[CustomNameplates] </gradient><color:#baffd1>TAB Hooked!");
}
}

View File

@@ -95,6 +95,9 @@ public final class CustomNameplates extends JavaPlugin {
new Placeholders().register();
AdventureManager.consoleMessage("<gradient:#2E8B57:#48D1CC>[CustomNameplates]</gradient> <color:#baffd1>PlaceholderAPI Hooked!");
}
if (ConfigManager.MainConfig.tab){
AdventureManager.consoleMessage("<gradient:#2E8B57:#48D1CC>[CustomNameplates]</gradient> <color:#baffd1>TAB Hooked!");
}
Objects.requireNonNull(Bukkit.getPluginCommand("customnameplates")).setExecutor(new Execute(this));
Objects.requireNonNull(Bukkit.getPluginCommand("customnameplates")).setTabCompleter(new TabComplete(this));
this.resourceManager = new ResourceManager(this);

View File

@@ -161,7 +161,7 @@ public class ResourceManager {
CustomNameplates.instance.saveResource("space_split.png", false); //复制space_split.png
try{
FileUtils.copyFile(new File(CustomNameplates.instance.getDataFolder(),"space_split.png"), new File(t_file.getPath() + File.separatorChar + ConfigManager.MainConfig.folder_path + "space_split.png"));
FileUtils.copyFile(new File(CustomNameplates.instance.getDataFolder(),"space_split.png"), new File(t_file.getPath() + File.separator + "space_split.png"));
}catch (IOException e){
e.printStackTrace();
AdventureManager.consoleMessage("<red>[CustomNameplates] Error! Failed to copy space_split.png to resource pack...</red>");
@@ -263,7 +263,7 @@ public class ResourceManager {
private JsonObject getNegativeFontChar(int height, char character) {
JsonObject jsonObject = new JsonObject();
jsonObject.add("type", new JsonPrimitive("bitmap"));
jsonObject.add("file", new JsonPrimitive(ConfigManager.MainConfig.namespace + ":" + ConfigManager.MainConfig.folder_path.replaceAll("\\\\","/") +"space_split.png"));
jsonObject.add("file", new JsonPrimitive(ConfigManager.MainConfig.namespace + ":space_split.png"));
jsonObject.add("ascent", new JsonPrimitive(-5000));
jsonObject.add("height", new JsonPrimitive(height));
final JsonArray jsonArray = new JsonArray();

View File

@@ -1,2 +1,2 @@
text: '<font:nameplates:default>%nameplates_prefix%</font><green>Hello!</green> %player_name%<rainbow> %player_ip%</rainbow><font:nameplates:default>%nameplates_suffix%</font>'
text: '<font:nameplates:default>%nameplates_prefix%</font><rainbow>Hello!</rainbow> %player_name%<font:nameplates:default>%nameplates_suffix%</font>'
refresh-rate: 5

View File

@@ -10,7 +10,7 @@ mode: ProtocolLib
bossbar:
example:
text: '<font:nameplates:default>%nameplates_bg_player%Hello! %player_name%</font> <font:nameplates:default>%nameplates_bg_pos%You are now at: %player_x%, %player_y%, %player_z%</font>'
text: '<font:nameplates:default><color:#FFFEFD>%nameplates_bg_player%Hello! %player_name%</font> <font:nameplates:default><color:#FFFEFD>%nameplates_bg_pos%You are now at: %player_x%, %player_y%, %player_z%</font>'
refresh-rate: 5
# PINK
# YELLOW

View File

@@ -12,6 +12,7 @@ config:
# folder into the resource pack generated by ItemsAdder.
ItemsAdder: false
# When enabled, the plugin will hook into TAB's team management
# require a restart to apply this
TAB: false
# Your namespace
@@ -53,12 +54,15 @@ config:
# Placeholder based prefix and suffix system. When enabled, it is recommended
# to use PlaceholderAPI to be able to use this feature to the fullest extent.
# keep it empty if you don't want to enable this feature.
prefix: '<font:default><green>Hello!</green></font> '
suffix: '<font:default><rainbow> %player_ip%</rainbow></font>'
prefix: '<font:default><rainbow>Hello!</rainbow></font> '
suffix: ''
# should prefix/suffix be hidden when player is equipping a nameplate
hide-prefix-when-equipped: false
hide-suffix-when-equipped: false
# Thin-font support
use-thin-font: false
use-thin-font: false
# Extract default shader to plugin folder
extract-shader: true