From 039cb94b010c61b6013cb475f080bbe5857d7336 Mon Sep 17 00:00:00 2001 From: GIGABAIT93 <59637348+GIGABAIT93@users.noreply.github.com> Date: Fri, 22 Mar 2024 00:03:18 +0200 Subject: [PATCH] fix --- README.md | 3 ++- src/main/java/com/vcmi/config/data/ChatYAML.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 614be5b..dc1cec7 100644 --- a/README.md +++ b/README.md @@ -214,6 +214,7 @@ global: enabled: true alias: '!' command: g + # If empty, everyone can use this chat and see the messages permission: vcmi.chat.global see_all: true format: '&8[&6G&8] &a{player} &6=> &f{message}' @@ -223,13 +224,13 @@ staff: alias: '@' command: s permission: vcmi.chat.staff + see_all: false format: '&8&l[&4&lS&8&l] &b&l{server} &a&l{player} &6&l=> &f&l{message}' # Alert chat alert: enabled: true alias: '' command: alert - # If empty, everyone can use this chat and see the messages permission: vcmi.chat.alert see_all: true format: '&8[&4ALERT&8] &f{message}' diff --git a/src/main/java/com/vcmi/config/data/ChatYAML.java b/src/main/java/com/vcmi/config/data/ChatYAML.java index eeeda9f..7f88490 100644 --- a/src/main/java/com/vcmi/config/data/ChatYAML.java +++ b/src/main/java/com/vcmi/config/data/ChatYAML.java @@ -31,7 +31,8 @@ public static void reload() { setConfigValue("global.enabled", true); setConfigValue("global.alias", "!"); setConfigValue("global.command", "g"); - setConfigValue("global.permission", "vcmi.chat.global"); + yamlFile.setComment("global.permission", "If empty, everyone can use this chat and see the messages"); + setConfigValue("global.permission", ""); setConfigValue("global.see_all", true); setConfigValue("global.format", "&8[&6G&8] &a{player} &6=> &f{message}"); @@ -40,14 +41,13 @@ public static void reload() { setConfigValue("staff.alias", "@"); setConfigValue("staff.command", "s"); setConfigValue("staff.permission", "vcmi.chat.staff"); - setConfigValue("global.see_all", false); + setConfigValue("staff.see_all", false); setConfigValue("staff.format", "&8&l[&4&lS&8&l] &b&l{server} &a&l{player} &6&l=> &f&l{message}"); yamlFile.setComment("alert", "Alert chat"); setConfigValue("alert.enabled", true); setConfigValue("alert.alias", ""); setConfigValue("alert.command", "alert"); - yamlFile.setComment("alert.permission", "If empty, everyone can use this chat and see the messages"); setConfigValue("alert.permission", ""); setConfigValue("alert.see_all", true); setConfigValue("alert.format", "&8[&4ALERT&8] &f{message}");