refactor: rename bossBarNamespace to namespace for global and some other config things

This commit is contained in:
ChomeNS
2024-12-17 16:36:19 +07:00
parent 0995c12b70
commit 2340991012
4 changed files with 5 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ public class Configuration {
public String weatherApiKey;
public String bossBarNamespace = "chomens_bot";
public String namespace = "chomens_bot";
public String teamName = "chomens_bot";
public Core core = new Core();

View File

@@ -68,7 +68,7 @@ public class BotBossBar extends BossBar {
bot.core.run("minecraft:bossbar set " + id + " name " + serialized);
if (!bot.core.hasRateLimit()) bot.core.run("minecraft:execute as @e[type=minecraft:text_display,tag=" + bot.config.bossBarNamespace + "_" + onlyName + "] run data modify entity @s text set value '" + serialized.replace("\\", "\\\\").replace("'", "\\'") + "'");
if (!bot.core.hasRateLimit()) bot.core.run("minecraft:execute as @e[type=minecraft:text_display,tag=" + bot.config.namespace + "_" + onlyName + "] run data modify entity @s text set value '" + serialized.replace("\\", "\\\\").replace("'", "\\'") + "'");
}
public BossBarColor color(BossBarColor color) {

View File

@@ -32,7 +32,7 @@ public class BossbarManagerPlugin extends Bot.Listener {
public BossbarManagerPlugin (Bot bot) {
this.bot = bot;
this.bossBarPrefix = bot.config.bossBarNamespace + ":";
this.bossBarPrefix = bot.config.namespace + ":";
bot.addListener(this);

View File

@@ -88,8 +88,8 @@ keys:
weatherApiKey: 'key here' # weatherapi.com key
bossBarNamespace: 'chomens_bot' # useful when you make a clone of the bot
teamName: 'chomens_bot' # i recommend having this value the same as bossBarNamespace
namespace: 'default_chomens_bot' # useful when you make a clone of the bot
teamName: 'default_chomens_bot' # i recommend having this value the same as bossBarNamespace
core:
start: