style: replace remaining MiniMessage tags with &#RRGGBB format
This commit is contained in:
parent
7f2c384d8a
commit
3fddf48cb3
6 changed files with 20 additions and 20 deletions
|
|
@ -46,7 +46,7 @@ public class ChatColorCommand implements CommandExecutor, TabCompleter {
|
|||
|
||||
// Проверяем валидность цвета (формат &X где X - это цветовой код)
|
||||
if (!isValidColor(color)) {
|
||||
player.sendMessage(ChatFormatter.parse("<red>Неверный формат цвета! Используйте формат &X, например: &b, &a, &c</red>"));
|
||||
player.sendMessage(ChatFormatter.parse("&#FF0000Неверный формат цвета! Используйте формат &X, например: &b, &a, &c"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ public class ChatColorCommand implements CommandExecutor, TabCompleter {
|
|||
|
||||
// Показываем пример с примененным цветом
|
||||
String preview = ChatFormatter.convertAllColors(color + "Пример текста");
|
||||
player.sendMessage(ChatFormatter.parse("<green>Цвет чата установлен! Пример: " + preview));
|
||||
player.sendMessage(ChatFormatter.parse("�FF00Цвет чата установлен! Пример: " + preview));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,26 +29,26 @@ public class LoChatCommand implements CommandExecutor, TabCompleter {
|
|||
}
|
||||
|
||||
if (args.length == 0) {
|
||||
sender.sendMessage(ChatFormatter.parse("<gold>LoChat v" + plugin.getDescription().getVersion() + "</gold>"));
|
||||
sender.sendMessage(ChatFormatter.parse("&#FFD700LoChat v" + plugin.getDescription().getVersion()));
|
||||
sender.sendMessage(ChatFormatter.parse("󅒐Команды:"));
|
||||
sender.sendMessage(ChatFormatter.parse("<yellow>/lochat reload</yellow> - Перезагрузить конфиги"));
|
||||
sender.sendMessage(ChatFormatter.parse("<yellow>/lochat commands</yellow> - Список кастомных команд"));
|
||||
sender.sendMessage(ChatFormatter.parse("<yellow>/lochat commands reload</yellow> - Перезагрузить кастомные команды"));
|
||||
sender.sendMessage(ChatFormatter.parse("&#FFFF00/lochat reload - Перезагрузить конфиги"));
|
||||
sender.sendMessage(ChatFormatter.parse("&#FFFF00/lochat commands - Список кастомных команд"));
|
||||
sender.sendMessage(ChatFormatter.parse("&#FFFF00/lochat commands reload - Перезагрузить кастомные команды"));
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (args[0].toLowerCase()) {
|
||||
case "reload" -> {
|
||||
plugin.reload();
|
||||
sender.sendMessage(ChatFormatter.parse("<green>Конфигурация перезагружена!</green>"));
|
||||
sender.sendMessage(ChatFormatter.parse("�FF00Конфигурация перезагружена!"));
|
||||
}
|
||||
case "commands" -> {
|
||||
if (args.length > 1 && args[1].equalsIgnoreCase("reload")) {
|
||||
plugin.getCustomCommandManager().reload();
|
||||
sender.sendMessage(ChatFormatter.parse("<green>Кастомные команды перезагружены!</green>"));
|
||||
sender.sendMessage(ChatFormatter.parse("�FF00Кастомные команды перезагружены!"));
|
||||
} else {
|
||||
var commands = plugin.getCustomCommandManager().getCommands();
|
||||
sender.sendMessage(ChatFormatter.parse("<gold>Кастомные команды (" + commands.size() + "):</gold>"));
|
||||
sender.sendMessage(ChatFormatter.parse("&#FFD700Кастомные команды (" + commands.size() + "):"));
|
||||
for (var cmd : commands.values()) {
|
||||
sender.sendMessage(ChatFormatter.parse("&e/" + cmd.name + " 󅒐(" + cmd.type + ")"));
|
||||
if (!cmd.aliases.isEmpty()) {
|
||||
|
|
@ -57,7 +57,7 @@ public class LoChatCommand implements CommandExecutor, TabCompleter {
|
|||
}
|
||||
}
|
||||
}
|
||||
default -> sender.sendMessage(ChatFormatter.parse("<red>Неизвестная команда. Используйте /lochat для помощи.</red>"));
|
||||
default -> sender.sendMessage(ChatFormatter.parse("&#FF0000Неизвестная команда. Используйте /lochat для помощи."));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class MuteCommand implements CommandExecutor, TabCompleter {
|
|||
// Парсим время
|
||||
long duration = parseTime(timeStr);
|
||||
if (duration == -1) {
|
||||
sender.sendMessage(ChatFormatter.parse("<red>Неверный формат времени! Используйте: 1m, 1h, 1d, permanent"));
|
||||
sender.sendMessage(ChatFormatter.parse("&#FF0000Неверный формат времени! Используйте: 1m, 1h, 1d, permanent"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class UnmuteCommand implements CommandExecutor, TabCompleter {
|
|||
));
|
||||
|
||||
if (target.isOnline()) {
|
||||
target.sendMessage(ChatFormatter.parse("<green>Вы были размучены!"));
|
||||
target.sendMessage(ChatFormatter.parse("�FF00Вы были размучены!"));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class ConfigManager {
|
|||
// Добавляем настройки объявлений если их нет
|
||||
if (!config.contains("announcements")) {
|
||||
config.set("announcements.show-title", true);
|
||||
config.set("announcements.title-header", "<gold>ОБЪЯВЛЕНИЕ</gold>");
|
||||
config.set("announcements.title-header", "&#FFD700ОБЪЯВЛЕНИЕ");
|
||||
config.set("announcements.show-actionbar", true);
|
||||
config.set("announcements.title-duration", 3);
|
||||
}
|
||||
|
|
@ -55,8 +55,8 @@ public class ConfigManager {
|
|||
config.set("mentions.enabled", true);
|
||||
config.set("mentions.sound", true);
|
||||
config.set("mentions.sound-type", "BLOCK_NOTE_BLOCK_PLING");
|
||||
config.set("mentions.highlight", "<yellow>@{player}</yellow>");
|
||||
config.set("mentions.self-highlight", "<gold><bold>{player}</bold></gold>");
|
||||
config.set("mentions.highlight", "&#FFFF00@{player}");
|
||||
config.set("mentions.self-highlight", "&#FFD700{player}");
|
||||
}
|
||||
|
||||
if (!config.contains("filter.enabled")) {
|
||||
|
|
@ -164,11 +164,11 @@ public class ConfigManager {
|
|||
}
|
||||
|
||||
public String getMentionHighlight() {
|
||||
return config.getString("mentions.highlight", "<yellow>@{player}</yellow>");
|
||||
return config.getString("mentions.highlight", "&#FFFF00@{player}");
|
||||
}
|
||||
|
||||
public String getSelfMentionHighlight() {
|
||||
return config.getString("mentions.self-highlight", "<gold><bold>{player}</bold></gold>");
|
||||
return config.getString("mentions.self-highlight", "&#FFD700{player}");
|
||||
}
|
||||
|
||||
// Filter
|
||||
|
|
@ -220,7 +220,7 @@ public class ConfigManager {
|
|||
|
||||
// Formats
|
||||
public String getAnnouncementFormat() {
|
||||
return config.getString("formats.announcement", "<gold>[ОБЪЯВЛЕНИЕ]</gold> <message>");
|
||||
return config.getString("formats.announcement", "&#FFD700[ОБЪЯВЛЕНИЕ] <message>");
|
||||
}
|
||||
|
||||
// Announcements
|
||||
|
|
@ -229,7 +229,7 @@ public class ConfigManager {
|
|||
}
|
||||
|
||||
public String getAnnouncementTitleHeader() {
|
||||
return config.getString("announcements.title-header", "<gold>ОБЪЯВЛЕНИЕ</gold>");
|
||||
return config.getString("announcements.title-header", "&#FFD700ОБЪЯВЛЕНИЕ");
|
||||
}
|
||||
|
||||
public boolean isAnnouncementActionBarEnabled() {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class MessageConfig {
|
|||
}
|
||||
|
||||
public String get(String path) {
|
||||
return messages.getString(path, "<red>Message not found: " + path + "</red>");
|
||||
return messages.getString(path, "&#FF0000Message not found: " + path);
|
||||
}
|
||||
|
||||
public String get(String path, String... replacements) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue