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);
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user