refactor: rename bossBarNamespace to namespace for global and some other config things
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user