From faec412effef3fd91052a77e12de2da9b1a2cec1 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 17 Apr 2021 23:06:54 +0200 Subject: [PATCH] Update to new ColorConfig --- .../bausystem/features/tpslimit/TPSLimitCommand.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitCommand.java index 05c16f28..61429e55 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSLimitCommand.java @@ -21,6 +21,7 @@ package de.steamwar.bausystem.features.tpslimit; import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; +import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.Enable; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; @@ -29,7 +30,6 @@ import de.steamwar.command.SWCommandUtils; import de.steamwar.command.TypeMapper; import lombok.AccessLevel; import lombok.Getter; -import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.Bukkit; @@ -66,7 +66,7 @@ public class TPSLimitCommand extends SWCommand implements Enable { @Register(help = true) public void genericHelp(Player p, String... args) { p.sendMessage(BauSystem.PREFIX + "Jetziges TPS limit: " + TPSLimitUtils.currentTPSLimit); - p.sendMessage(ChatColor.DARK_GRAY + "/" + ChatColor.YELLOW + "tpslimit " + ChatColor.DARK_GRAY + "[" + ChatColor.GRAY + "TPS" + ChatColor.DARK_GRAY + "|" + ChatColor.YELLOW + "default" + ChatColor.DARK_GRAY + "] - " + ChatColor.GRAY + "Setzte die TPS auf dem Bau"); + p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "tpslimit " + ColorConfig.OTHER + "[" + ColorConfig.BASE + "TPS" + ColorConfig.OTHER + "|" + ColorConfig.HIGHLIGHT + "default" + ColorConfig.OTHER + "] - " + ColorConfig.BASE + "Setzte die TPS auf dem Bau"); } @Register({"default"}) @@ -103,17 +103,17 @@ public class TPSLimitCommand extends SWCommand implements Enable { @SuppressWarnings("BooleanMethodIsAlwaysInverted") private boolean permissionCheck(Player player) { if (!Permission.hasPermission(player, Permission.WORLD)) { - player.sendMessage(BauSystem.PREFIX + ChatColor.RED + "Du darfst hier nicht den TPS-Limiter nutzen"); + player.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + "Du darfst hier nicht den TPS-Limiter nutzen"); return false; } return true; } private void sendNewTPSLimitMessage() { - Bukkit.getOnlinePlayers().forEach(p -> p.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(ChatColor.YELLOW + "TPS limit auf " + TPSLimitUtils.currentTPSLimit + " gesetzt."))); + Bukkit.getOnlinePlayers().forEach(p -> p.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(ColorConfig.HIGHLIGHT + "TPS limit auf " + TPSLimitUtils.currentTPSLimit + " gesetzt."))); } private void sendInvalidArgumentMessage(Player player) { - player.sendMessage(BauSystem.PREFIX + ChatColor.RED + "Nur Zahlen zwischen 0,5 und " + (TPSWarpUtils.isWarpAllowed() ? 60 : 20) + ", und 'default' erlaubt."); + player.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + "Nur Zahlen zwischen 0,5 und " + (TPSWarpUtils.isWarpAllowed() ? 60 : 20) + ", und 'default' erlaubt."); } } \ No newline at end of file