SteamWar/BauSystem2.0
Archiviert
12
0

Remove ColorConfig.java
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-12-30 13:41:54 +01:00
Ursprung 49295076d6
Commit a0f405922a
14 geänderte Dateien mit 18 neuen und 57 gelöschten Zeilen

Datei anzeigen

@ -677,6 +677,8 @@ TRACE_COMMAND_HELP_DELETE = §8/§etrace delete §8- §7Löscht alle TNT-Positio
TRACE_COMMAND_HELP_LIST = §8/§etrace list §8- §7Trace GUI nur im Chat TRACE_COMMAND_HELP_LIST = §8/§etrace list §8- §7Trace GUI nur im Chat
TRACE_COMMAND_HELP_GUI = §8/§etrace gui §8- §7Zeigt die Trace Oberfläche an TRACE_COMMAND_HELP_GUI = §8/§etrace gui §8- §7Zeigt die Trace Oberfläche an
TRACE_GUI_ITEM_NAME = §eTracer
TRACE_GUI_ITEM_LORE = §7Status§8: {0}
TRACE_GUI_NAME = Tracer Gui TRACE_GUI_NAME = Tracer Gui
TRACE_GUI_TRACE_INACTIVE = §eTracer Starten TRACE_GUI_TRACE_INACTIVE = §eTracer Starten
TRACE_GUI_TRACE_ACTIVE = §eTracer Stoppen TRACE_GUI_TRACE_ACTIVE = §eTracer Stoppen
@ -869,6 +871,7 @@ OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn
DEBUG_STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick DEBUG_STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick
DEBUG_STICK_NAME=§eDebugstick DEBUG_STICK_NAME=§eDebugstick
#Skull Gui #Skull Gui
SKULL_GUI_ITEM_NAME = §eSpieler Köpfe
ANVIL_INV_NAME=Spieler name ANVIL_INV_NAME=Spieler name
# StructureVoid # StructureVoid
STRUCTURE_VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid STRUCTURE_VOID_COMMAND_HELP=§8/§estructureVoid §8-§7 Erhalte ein StructureVoid
@ -919,6 +922,7 @@ RT_ITEM_NAME=§eRedstonetester
RT_ITEM_LORE_1=§eLinksklick Block §8-§7 Setzt die 1. Position RT_ITEM_LORE_1=§eLinksklick Block §8-§7 Setzt die 1. Position
RT_ITEM_LORE_2=§eRechtsklick Block §8-§7 Setzt die 2. Position RT_ITEM_LORE_2=§eRechtsklick Block §8-§7 Setzt die 2. Position
RT_ITEM_LORE_3=§eShift-Rechtsklick Luft §8-§7 Zurücksetzten RT_ITEM_LORE_3=§eShift-Rechtsklick Luft §8-§7 Zurücksetzten
RT_LOC=§8: §e{0} {1} {2}
RT_INVALID_LOC=§cUnbekannte Position RT_INVALID_LOC=§cUnbekannte Position
RT_RESULT=§7Differenz§8: §e{0}§7 Ticks §8,§7 R-Ticks §e{1} RT_RESULT=§7Differenz§8: §e{0}§7 Ticks §8,§7 R-Ticks §e{1}
RT_ACTIVATE=§7Positionen gelöscht§8. RT_ACTIVATE=§7Positionen gelöscht§8.

Datei anzeigen

@ -19,7 +19,6 @@
package de.steamwar.bausystem; package de.steamwar.bausystem;
import de.steamwar.bausystem.config.ColorConfig;
import de.steamwar.bausystem.configplayer.Config; import de.steamwar.bausystem.configplayer.Config;
import de.steamwar.bausystem.linkage.LinkageUtils; import de.steamwar.bausystem.linkage.LinkageUtils;
import de.steamwar.bausystem.region.loader.PrototypeLoader; import de.steamwar.bausystem.region.loader.PrototypeLoader;
@ -53,8 +52,6 @@ public class BauSystem extends JavaPlugin implements Listener {
@Getter @Getter
private static BauSystem instance; private static BauSystem instance;
public static final String PREFIX = ColorConfig.HIGHLIGHT + "BauSystem" + ColorConfig.OTHER + "» " + ColorConfig.BASE;
private World world; private World world;
@Override @Override

Datei anzeigen

@ -61,5 +61,4 @@ public class BauServer {
public int getOwnerID() { public int getOwnerID() {
return SteamwarUser.get(getOwner()).getId(); return SteamwarUser.get(getOwner()).getId();
} }
} }

Datei anzeigen

@ -1,30 +0,0 @@
/*
* 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;
}

Datei anzeigen

@ -22,12 +22,12 @@ package de.steamwar.bausystem.features.gui;
import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.SWUtils;
import de.steamwar.bausystem.config.ColorConfig;
import de.steamwar.bausystem.features.gui.editor.BauGuiMapping; import de.steamwar.bausystem.features.gui.editor.BauGuiMapping;
import de.steamwar.bausystem.linkage.specific.BauGuiItem; import de.steamwar.bausystem.linkage.specific.BauGuiItem;
import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWInventory;
import lombok.Getter; import lombok.Getter;
import lombok.experimental.UtilityClass; import lombok.experimental.UtilityClass;
import net.md_5.bungee.api.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -47,7 +47,7 @@ public class BauGUI {
public static ItemStack getGUI_ITEM(Player p) { public static ItemStack getGUI_ITEM(Player p) {
ItemStack GUI_ITEM = new ItemStack(Material.NETHER_STAR); ItemStack GUI_ITEM = new ItemStack(Material.NETHER_STAR);
ItemMeta meta = GUI_ITEM.getItemMeta(); ItemMeta meta = GUI_ITEM.getItemMeta();
meta.setDisplayName(ColorConfig.HIGHLIGHT + BauSystem.MESSAGE.parse("GUI_NAME", p)); meta.setDisplayName(ChatColor.YELLOW + BauSystem.MESSAGE.parse("GUI_NAME", p));
GUI_ITEM.setItemMeta(meta); GUI_ITEM.setItemMeta(meta);
return GUI_ITEM; return GUI_ITEM;
} }

Datei anzeigen

@ -20,7 +20,6 @@
package de.steamwar.bausystem.features.gui; package de.steamwar.bausystem.features.gui;
import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.config.ColorConfig;
import de.steamwar.bausystem.features.gui.editor.BauGuiEditor; import de.steamwar.bausystem.features.gui.editor.BauGuiEditor;
import de.steamwar.bausystem.features.gui.editor.BauGuiImportExport; import de.steamwar.bausystem.features.gui.editor.BauGuiImportExport;
import de.steamwar.bausystem.features.gui.editor.BauGuiMapping; import de.steamwar.bausystem.features.gui.editor.BauGuiMapping;
@ -28,6 +27,7 @@ import de.steamwar.bausystem.linkage.LinkageType;
import de.steamwar.bausystem.linkage.Linked; import de.steamwar.bausystem.linkage.Linked;
import de.steamwar.command.SWCommand; import de.steamwar.command.SWCommand;
import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWItem;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.HoverEvent; import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.chat.TextComponent;
@ -59,7 +59,7 @@ public class BauGUICommand extends SWCommand {
public void exportGui(Player p) { public void exportGui(Player p) {
String export = BauGuiImportExport.exportGui(BauGuiMapping.getGuiMapping(p)); String export = BauGuiImportExport.exportGui(BauGuiMapping.getGuiMapping(p));
TextComponent component = new TextComponent(); TextComponent component = new TextComponent();
component.setColor(ColorConfig.HIGHLIGHT); component.setColor(ChatColor.YELLOW);
component.setBold(true); component.setBold(true);
component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(BauSystem.MESSAGE.parse("GUI_EXPORT_CODE_HOVER", p)))); component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(BauSystem.MESSAGE.parse("GUI_EXPORT_CODE_HOVER", p))));
component.setClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, export)); component.setClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, export));

Datei anzeigen

@ -26,6 +26,7 @@ import de.steamwar.bausystem.linkage.LinkageType;
import de.steamwar.bausystem.linkage.Linked; import de.steamwar.bausystem.linkage.Linked;
import de.steamwar.bausystem.linkage.specific.BauGuiItem; import de.steamwar.bausystem.linkage.specific.BauGuiItem;
import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWItem;
import net.md_5.bungee.api.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;
@ -42,7 +43,7 @@ public class BauGuiBauGuiItem extends BauGuiItem {
@Override @Override
public ItemStack getItem(Player player) { public ItemStack getItem(Player player) {
return new SWItem(Material.NETHER_STAR, ColorConfig.HIGHLIGHT + BauSystem.MESSAGE.parse("GUI_NAME", player), return new SWItem(Material.NETHER_STAR, ChatColor.YELLOW + BauSystem.MESSAGE.parse("GUI_NAME", player),
Arrays.asList(BauSystem.MESSAGE.parse("GUI_ITEM_LORE1", player), BauSystem.MESSAGE.parse("GUI_ITEM_LORE2", player)), false, clickType -> { Arrays.asList(BauSystem.MESSAGE.parse("GUI_ITEM_LORE1", player), BauSystem.MESSAGE.parse("GUI_ITEM_LORE2", player)), false, clickType -> {
}).getItemStack(); }).getItemStack();
} }

Datei anzeigen

@ -20,7 +20,6 @@
package de.steamwar.bausystem.features.gui.editor; package de.steamwar.bausystem.features.gui.editor;
import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.config.ColorConfig;
import de.steamwar.bausystem.features.gui.BauGUI; import de.steamwar.bausystem.features.gui.BauGUI;
import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.LinkageType;
import de.steamwar.bausystem.linkage.Linked; import de.steamwar.bausystem.linkage.Linked;
@ -65,7 +64,7 @@ public class BauGuiEditor implements Listener {
} }
for (int j = mapping.getSize(); j < mapping.getSize() + 9; j++) { for (int j = mapping.getSize(); j < mapping.getSize() + 9; j++) {
inv.setItem(j, new SWItem(Material.WHITE_STAINED_GLASS_PANE, ColorConfig.HIGHLIGHT + "").getItemStack()); inv.setItem(j, new SWItem(Material.WHITE_STAINED_GLASS_PANE, "").getItemStack());
} }
inv.setItem(mapping.getSize() + 3, new SWItem(mapping.getSize() == 9 * 5 ? Material.GRAY_STAINED_GLASS_PANE : Material.LIME_STAINED_GLASS_PANE, BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_ROW_P", p)).getItemStack()); inv.setItem(mapping.getSize() + 3, new SWItem(mapping.getSize() == 9 * 5 ? Material.GRAY_STAINED_GLASS_PANE : Material.LIME_STAINED_GLASS_PANE, BauSystem.MESSAGE.parse("GUI_EDITOR_ITEM_ROW_P", p)).getItemStack());

Datei anzeigen

@ -200,7 +200,7 @@ public class Loadtimer implements Listener {
if (tntPlaced.size() > 1) { if (tntPlaced.size() > 1) {
BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_PLAYERTABLE_PLAYER", player, BauSystem.MESSAGE.parse("LOADTIMER_SUMARY_PLAYERTABLE_ALL", player), finalAllTnt, new DecimalFormat("#.#").format(finalAllTnt / (loadTime / 20D))); BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_PLAYERTABLE_PLAYER", player, BauSystem.MESSAGE.parse("LOADTIMER_SUMARY_PLAYERTABLE_ALL", player), finalAllTnt, new DecimalFormat("#.#").format(finalAllTnt / (loadTime / 20D)));
} }
player.sendMessage(ColorConfig.BASE + ""); player.sendMessage("");
BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_TIMES_HEAD", player); BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_TIMES_HEAD", player);
BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_TIMES_START", player); BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_TIMES_START", player);
BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_TIMES_ACTIVATION", player, new DecimalFormat("#.#").format((loadTime / 20D)), loadTime); BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_TIMES_ACTIVATION", player, new DecimalFormat("#.#").format((loadTime / 20D)), loadTime);
@ -209,7 +209,7 @@ public class Loadtimer implements Listener {
BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_TIMES_EXPLOSION", player, new DecimalFormat("#.#").format((finalExplTime / 20D)), finalExplTime); BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_TIMES_EXPLOSION", player, new DecimalFormat("#.#").format((finalExplTime / 20D)), finalExplTime);
} }
BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_TIMES_LAST", player); BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_TIMES_LAST", player);
player.sendMessage(ColorConfig.BASE + ""); player.sendMessage("");
BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_STATS_HEAD", player); BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_STATS_HEAD", player);
BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_STATS_TNT", player, finalAllTnt); BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_STATS_TNT", player, finalAllTnt);
BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_STATS_FREQ", player, 60D / (loadTime / 20D), 60D / ((finalExplTime + Math.max(ignTime, 0) + loadTime) / 20D)); BauSystem.MESSAGE.sendPrefixless("LOADTIMER_SUMARY_STATS_FREQ", player, 60D / (loadTime / 20D), 60D / ((finalExplTime + Math.max(ignTime, 0) + loadTime) / 20D));

Datei anzeigen

@ -20,7 +20,6 @@
package de.steamwar.bausystem.features.redstonetester; package de.steamwar.bausystem.features.redstonetester;
import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.config.ColorConfig;
import de.steamwar.bausystem.features.tpslimit.TPSUtils; import de.steamwar.bausystem.features.tpslimit.TPSUtils;
import de.steamwar.bausystem.utils.ItemUtils; import de.steamwar.bausystem.utils.ItemUtils;
import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWItem;
@ -58,11 +57,7 @@ public class RedstonetesterUtils {
private final Map<Player, RedstoneTester> playerMap = new HashMap<>(); private final Map<Player, RedstoneTester> playerMap = new HashMap<>();
public void sendLocation(Player player, String prefix, Location location) { public void sendLocation(Player player, String prefix, Location location) {
player.sendMessage(BauSystem.PREFIX + prefix + ColorConfig.OTHER + ": " + ColorConfig.HIGHLIGHT + locationToString(location)); BauSystem.MESSAGE.send("RT_LOC", player, location.getBlockX(), location.getBlockY(), location.getBlockZ());
}
public String locationToString(Location location) {
return location.getBlockX() + " " + location.getBlockY() + " " + location.getBlockZ();
} }
@SuppressWarnings("BooleanMethodIsAlwaysInverted") @SuppressWarnings("BooleanMethodIsAlwaysInverted")

Datei anzeigen

@ -20,7 +20,6 @@
package de.steamwar.bausystem.features.testblock.depthcounter; package de.steamwar.bausystem.features.testblock.depthcounter;
import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.config.ColorConfig;
import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.LinkageType;
import de.steamwar.bausystem.linkage.Linked; import de.steamwar.bausystem.linkage.Linked;
import de.steamwar.command.SWCommand; import de.steamwar.command.SWCommand;
@ -36,7 +35,7 @@ public class DepthCounterCommand extends SWCommand {
@Register(value = "toggle", description = "DEPTH_COUNTER_COMMAND_TOGGLE_HELP") @Register(value = "toggle", description = "DEPTH_COUNTER_COMMAND_TOGGLE_HELP")
public void toggleCommand(Player p, CountMode countMode) { public void toggleCommand(Player p, CountMode countMode) {
DepthCounter.toggleMode(p, countMode); DepthCounter.toggleMode(p, countMode);
p.sendMessage(BauSystem.PREFIX + "Aktive Zählmodi: " + ColorConfig.HIGHLIGHT + DepthCounter.getModes(p) + ColorConfig.BASE + "."); BauSystem.MESSAGE.send("DEPTH_COUNTER_ACTIVE_MESSAGE", p, DepthCounter.getModes(p).toString());
} }
@Register(value = "enable", description = "DEPTH_COUNTER_COMMAND_ENABLE_HELP") @Register(value = "enable", description = "DEPTH_COUNTER_COMMAND_ENABLE_HELP")

Datei anzeigen

@ -21,7 +21,6 @@ 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.record.RecordStatus; import de.steamwar.bausystem.features.tracer.record.RecordStatus;
import de.steamwar.bausystem.features.tracer.show.TraceShowManager; import de.steamwar.bausystem.features.tracer.show.TraceShowManager;
@ -46,7 +45,7 @@ public class TracerBauGuiItem extends BauGuiItem {
@Override @Override
public ItemStack getItem(Player player) { public ItemStack getItem(Player player) {
return new SWItem(Material.OBSERVER, ColorConfig.HIGHLIGHT + "Tracer", Arrays.asList(ColorConfig.BASE + "Status: " + BauSystem.MESSAGE.parse(RecordStateMachine.getRecordStatus().getName(), player)), false, clickType -> { return new SWItem(Material.OBSERVER, BauSystem.MESSAGE.parse("TRACE_GUI_ITEM_NAME", player), Arrays.asList(BauSystem.MESSAGE.parse("TRACE_GUI_ITEM_LORE", player, BauSystem.MESSAGE.parse(RecordStateMachine.getRecordStatus().getName(), player))), false, clickType -> {
}).getItemStack(); }).getItemStack();
} }

Datei anzeigen

@ -21,10 +21,9 @@ package de.steamwar.bausystem.features.util.items;
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.linkage.specific.BauGuiItem;
import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.LinkageType;
import de.steamwar.bausystem.linkage.Linked; import de.steamwar.bausystem.linkage.Linked;
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
import de.steamwar.inventory.SWAnvilInv; import de.steamwar.inventory.SWAnvilInv;
import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWItem;
import org.bukkit.Material; import org.bukkit.Material;
@ -41,7 +40,7 @@ public class SkullBauGuiItem extends BauGuiItem {
@Override @Override
public ItemStack getItem(Player player) { public ItemStack getItem(Player player) {
return new SWItem(Material.PLAYER_HEAD, ColorConfig.HIGHLIGHT + "Spieler Köpfe").getItemStack(); return new SWItem(Material.PLAYER_HEAD, BauSystem.MESSAGE.parse("SKULL_GUI_ITEM_NAME", player)).getItemStack();
} }
@Override @Override

Datei anzeigen

@ -23,7 +23,6 @@ import de.steamwar.sql.SteamwarUser;
import lombok.experimental.UtilityClass; import lombok.experimental.UtilityClass;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import yapion.hierarchy.output.FileOutput; import yapion.hierarchy.output.FileOutput;
import yapion.hierarchy.types.YAPIONArray;
import yapion.hierarchy.types.YAPIONObject; import yapion.hierarchy.types.YAPIONObject;
import yapion.parser.YAPIONParser; import yapion.parser.YAPIONParser;