SteamWar/BauSystem2.0
Archiviert
12
0

Add ColorConfig to softcode every Color we use

Dieser Commit ist enthalten in:
yoyosource 2021-04-17 22:56:15 +02:00
Ursprung de2bb73444
Commit 8cab75b90f
3 geänderte Dateien mit 42 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -19,9 +19,9 @@
package de.steamwar.bausystem; package de.steamwar.bausystem;
import de.steamwar.bausystem.config.ColorConfig;
import de.steamwar.bausystem.linkage.LinkageUtils; import de.steamwar.bausystem.linkage.LinkageUtils;
import lombok.Getter; import lombok.Getter;
import net.md_5.bungee.api.ChatColor;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
@ -30,7 +30,7 @@ public class BauSystem extends JavaPlugin implements Listener {
@Getter @Getter
private static BauSystem instance; private static BauSystem instance;
public static final String PREFIX = ChatColor.YELLOW + "BauSystem" + ChatColor.DARK_GRAY + "» " + ChatColor.GRAY; public static final String PREFIX = ColorConfig.HIGHLIGHT + "BauSystem" + ColorConfig.OTHER + "» " + ColorConfig.BASE;
@Override @Override
public void onEnable() { public void onEnable() {

Datei anzeigen

@ -0,0 +1,35 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2021 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.bausystem.config;
import lombok.experimental.UtilityClass;
import net.md_5.bungee.api.ChatColor;
@UtilityClass
public class ColorConfig {
public final ChatColor BASE = ChatColor.GRAY;
public final ChatColor HIGHLIGHT = ChatColor.YELLOW;
public final ChatColor OTHER = ChatColor.DARK_GRAY;
public final ChatColor ENABLE = ChatColor.GREEN;
public final ChatColor DISABLE = ChatColor.RED;
}

Datei anzeigen

@ -21,6 +21,7 @@ package de.steamwar.bausystem.features.tracer;
import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.config.ColorConfig;
import de.steamwar.bausystem.features.tracer.record.RecordStateMachine; import de.steamwar.bausystem.features.tracer.record.RecordStateMachine;
import de.steamwar.bausystem.features.tracer.show.ShowModeParameter; import de.steamwar.bausystem.features.tracer.show.ShowModeParameter;
import de.steamwar.bausystem.features.tracer.show.ShowModeParameterType; import de.steamwar.bausystem.features.tracer.show.ShowModeParameterType;
@ -41,11 +42,11 @@ public class TraceCommand extends SWCommand {
@Register(help = true) @Register(help = true)
public void genericHelp(Player p, String... args) { public void genericHelp(Player p, String... args) {
p.sendMessage("§8/§etrace start §8- §7Startet die Aufnahme aller TNT-Positionen"); p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "trace start " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Startet die Aufnahme aller TNT-Positionen");
p.sendMessage("§8/§etrace stop §8- §7Stoppt den TNT-Tracer"); p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "trace stop " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Stoppt den TNT-Tracer");
p.sendMessage("§8/§etrace toggleauto §8- §7Automatischer Aufnahmenstart"); p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "trace toggleauto " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Automatischer Aufnahmenstart");
// p.sendMessage("§8/§etrace show gui §8- §7Zeigt die Trace show gui"); // p.sendMessage("§8/§etrace show gui §8- §7Zeigt die Trace show gui");
p.sendMessage("§8/§etrace show §8<§e-water§8|§e-interpolate-xz§8|§e-interpolate-y§8> §8- §7Zeigt alle TNT-Positionen"); p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "trace show " + ColorConfig.OTHER + "<" + ColorConfig.HIGHLIGHT + "-water" + ColorConfig.OTHER + "|" + ColorConfig.HIGHLIGHT + "-interpolate-xz" + ColorConfig.OTHER + "|" + ColorConfig.HIGHLIGHT + "-interpolate-y" + ColorConfig.OTHER + "> " + ColorConfig.OTHER + "- " + ColorConfig.BASE + "Zeigt alle TNT-Positionen");
p.sendMessage("§8/§etrace hide §8- §7Versteckt alle TNT-Positionen"); p.sendMessage("§8/§etrace hide §8- §7Versteckt alle TNT-Positionen");
p.sendMessage("§8/§etrace delete §8- §7Löscht alle TNT-Positionen"); p.sendMessage("§8/§etrace delete §8- §7Löscht alle TNT-Positionen");
// p.sendMessage("§8/§etrace list §8<§7FRAME-ID§8> §8- §7Listet alle TNT auf"); // p.sendMessage("§8/§etrace list §8<§7FRAME-ID§8> §8- §7Listet alle TNT auf");