From ea929e06157af95dc0afc02d0a96de2f7270dc43 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sun, 25 Aug 2024 08:04:22 +0200 Subject: [PATCH 01/21] Hotfix Laufbau BoundingBoxLoader --- .../BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index 0b1b160c..0d5fa43c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -25,6 +25,7 @@ import de.steamwar.bausystem.configplayer.ConfigConverter; import de.steamwar.bausystem.features.gui.BauGUI; import de.steamwar.bausystem.features.script.lua.SteamWarLuaPlugin; import de.steamwar.bausystem.features.script.lua.libs.LuaLib; +import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader; import de.steamwar.bausystem.features.slaves.panzern.Panzern; import de.steamwar.bausystem.features.slaves.panzern.PanzernAlgorithm; import de.steamwar.bausystem.features.tpslimit.TPSFreezeUtils; @@ -184,6 +185,9 @@ public class BauSystem extends JavaPlugin { if (any instanceof ConfigConverter) { Config.addConfigConverter((ConfigConverter) any); } + if (any instanceof BoundingBoxLoader) { + ((BoundingBoxLoader) any).load(); + } }); instances.forEach((clazz, o) -> { From c61c2d808711100d3b1af5689f5b1932e72f10ac Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sun, 25 Aug 2024 15:34:07 +0200 Subject: [PATCH 02/21] Fix output on to small/large speed value --- .../src/de/steamwar/bausystem/features/util/SpeedCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java index 31308830..b73f68d5 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java @@ -41,9 +41,9 @@ public class SpeedCommand extends SWCommand { public void speedCommand(Player p, float speed) { speed = speed / 10F; if (speed < -1F) { - BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed); + BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed * 10); } else if (speed > 1F) { - BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed); + BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed * 10); } else { p.setFlySpeed(speed); p.setWalkSpeed(Math.min(speed + 0.1F, 1F)); From c8381413a34cb49bb9b088d5da82849e6cbd12e5 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sun, 25 Aug 2024 15:46:03 +0200 Subject: [PATCH 03/21] Add SimulatorCommand.rename --- .../BauSystem_Main/src/BauSystem.properties | 2 ++ .../BauSystem_Main/src/BauSystem_de.properties | 2 ++ .../features/simulator/SimulatorCommand.java | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/BauSystem/BauSystem_Main/src/BauSystem.properties b/BauSystem/BauSystem_Main/src/BauSystem.properties index 67a16a47..7cafc797 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem.properties @@ -271,6 +271,7 @@ SIMULATOR_CHANGE_HELP=§8/§esimulator change §8-§7 Change your simulator wand SIMULATOR_DELETE_HELP=§8/§esimulator delete §8[§7name§8] §8-§7 Deletes the simulator SIMULATOR_START_HELP=§8/§esimulator start §8[§7name§8] §8-§7 Starts the simulator SIMULATOR_COPY_HELP=§8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Copy the simulator +SIMULATOR_RENAME_HELP=§8/§esimulator rename §8[§7to-rename§8] §8[§7name§8] §8-§7 Rename the simulator SIMULATOR_GUI_ITEM_NAME=§eTNT Simulator SIMULATOR_NO_SIM_IN_HAND=§cNo simulator item selected SIMULATOR_GUI_SELECT_SIM=Simulator selection @@ -307,6 +308,7 @@ SIMULATOR_POSITION_Z=§7z-Position SIMULATOR_BACK=§eBack SIMULATOR_GUI_TOTAL_TNT=§7Total TNT§8: §e{0} SIMULATOR_DELETED=§cSimulator deleted +SIMULATOR_RENAMED=§cSimulator renamed ## GUI SIMULATOR_POSITION_EDIT=§eEdit position SIMULATOR_POSITION_ADD=§eSet position diff --git a/BauSystem/BauSystem_Main/src/BauSystem_de.properties b/BauSystem/BauSystem_Main/src/BauSystem_de.properties index 4013f3b2..77b31259 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem_de.properties @@ -254,6 +254,7 @@ SIMULATOR_CHANGE_HELP=§8/§esimulator change §8-§7 Wechsel zu einem anderen S SIMULATOR_DELETE_HELP=§8/§esimulator delete §8[§7name§8] §8-§7 Löscht den Simulator SIMULATOR_START_HELP=§8/§esimulator start §8[§7name§8] §8-§7 Startet die Simulation SIMULATOR_COPY_HELP=§8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Kopiert einen Simulator +SIMULATOR_RENAME_HELP=§8/§esimulator rename §8[§7to-copy§8] §8[§7name§8] §8-§7 Benennt einen Simulator um SIMULATOR_GUI_ITEM_NAME=§eTNT Simulator SIMULATOR_NO_SIM_IN_HAND=§cKein Simulator Item gewählt SIMULATOR_GUI_SELECT_SIM=Simulator wählen @@ -290,6 +291,7 @@ SIMULATOR_POSITION_Z=§7z-Position SIMULATOR_BACK=§eZurück SIMULATOR_GUI_TOTAL_TNT=§7Gesamt TNT§8: §e{0} SIMULATOR_DELETED=§cSimulator gelöscht +SIMULATOR_RENAMED=§cSimulator umbenannt ## GUI SIMULATOR_POSITION_EDIT=§ePosition bearbeiten SIMULATOR_POSITION_ADD=§ePosition setzen diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java index 06af3e68..199e8952 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java @@ -88,6 +88,24 @@ public class SimulatorCommand extends SWCommand { SimulatorExecutor.run(simulator); } + @Register(value = "rename", description = "SIMULATOR_RENAME_HELP") + public void rename(@Validator Player p, @ErrorMessage("SIMULATOR_NOT_EXISTS") Simulator simulator, String name) { + if (SimulatorStorage.getSimulator(name) != null) { + BauSystem.MESSAGE.send("SIMULATOR_NAME_ALREADY_EXISTS", p); + return; + } + if (!name.matches("[a-zA-Z_0-9-]+")) { + BauSystem.MESSAGE.send("SIMULATOR_NAME_INVALID", p); + return; + } + if (SimulatorStorage.copy(simulator, name)) { + SimulatorStorage.delete(simulator); + BauSystem.MESSAGE.send("SIMULATOR_RENAMED", p); + } else { + BauSystem.MESSAGE.send("SIMULATOR_ERROR_COPY", p); + } + } + @ClassMapper(value = Simulator.class, local = true) public TypeMapper allSimulators() { return new TypeMapper<>() { From a25e55ffdfd60cf1bebb4cb2ef92660be836741e Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sun, 25 Aug 2024 15:49:21 +0200 Subject: [PATCH 04/21] Fix Loader wait time to be 2 gameticks when 1 is selected --- .../src/de/steamwar/bausystem/features/loader/Loader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java index d8489a0f..fee6fdc6 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java @@ -90,7 +90,7 @@ public class Loader implements Listener { while (currentElement < elements.size()) { LoaderElement element = elements.get(currentElement); currentElement++; - element.execute(delay -> waitTime = delay); + element.execute(delay -> waitTime = delay - 1); if (waitTime > 0) { if (element instanceof LoaderTNT) currentElement--; return; From 9e2f2748b67b8c688a3b3b623c3d420773aaaade Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Mon, 26 Aug 2024 07:42:47 +0200 Subject: [PATCH 05/21] BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java aktualisiert --- .../steamwar/bausystem/features/util/SpeedCommand.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java index b73f68d5..c8a6d2de 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SpeedCommand.java @@ -39,12 +39,12 @@ public class SpeedCommand extends SWCommand { @Register public void speedCommand(Player p, float speed) { - speed = speed / 10F; - if (speed < -1F) { - BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed * 10); - } else if (speed > 1F) { - BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed * 10); + if (speed < -10F) { + BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed); + } else if (speed > 10F) { + BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed); } else { + speed = speed / 10F; p.setFlySpeed(speed); p.setWalkSpeed(Math.min(speed + 0.1F, 1F)); BauSystem.MESSAGE.send("SPEED_CURRENT", p, (p.getFlySpeed() * 10F)); From 6496f33a9e56f16d8f1d3acb8b4f0cace1f0dc5a Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Mon, 26 Aug 2024 07:44:54 +0200 Subject: [PATCH 06/21] Fix argument name of rename command --- BauSystem/BauSystem_Main/src/BauSystem_de.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BauSystem/BauSystem_Main/src/BauSystem_de.properties b/BauSystem/BauSystem_Main/src/BauSystem_de.properties index 77b31259..ca5c67d8 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem_de.properties @@ -254,7 +254,7 @@ SIMULATOR_CHANGE_HELP=§8/§esimulator change §8-§7 Wechsel zu einem anderen S SIMULATOR_DELETE_HELP=§8/§esimulator delete §8[§7name§8] §8-§7 Löscht den Simulator SIMULATOR_START_HELP=§8/§esimulator start §8[§7name§8] §8-§7 Startet die Simulation SIMULATOR_COPY_HELP=§8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Kopiert einen Simulator -SIMULATOR_RENAME_HELP=§8/§esimulator rename §8[§7to-copy§8] §8[§7name§8] §8-§7 Benennt einen Simulator um +SIMULATOR_RENAME_HELP=§8/§esimulator rename §8[§7to-rename§8] §8[§7name§8] §8-§7 Benennt einen Simulator um SIMULATOR_GUI_ITEM_NAME=§eTNT Simulator SIMULATOR_NO_SIM_IN_HAND=§cKein Simulator Item gewählt SIMULATOR_GUI_SELECT_SIM=Simulator wählen From 5f92d4c68c74b1691bc7a7f0404e4741e40464ce Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Tue, 27 Aug 2024 20:16:30 +0200 Subject: [PATCH 07/21] Fix Loader wait time to be 2 gameticks when 1 is selected --- .../src/de/steamwar/bausystem/features/loader/Loader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java index fee6fdc6..0ce38b9a 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java @@ -90,9 +90,10 @@ public class Loader implements Listener { while (currentElement < elements.size()) { LoaderElement element = elements.get(currentElement); currentElement++; - element.execute(delay -> waitTime = delay - 1); + element.execute(delay -> waitTime = delay); if (waitTime > 0) { if (element instanceof LoaderTNT) currentElement--; + waitTime--; return; } } From ac25dea08ac1767a99bf4924db3677377ddc6cff Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 29 Aug 2024 11:32:34 +0200 Subject: [PATCH 08/21] Fix PR stuff --- .../BauSystem_Main/src/BauSystem.properties | 2 +- .../src/BauSystem_de.properties | 2 +- .../features/simulator/SimulatorCommand.java | 39 +++++++++---------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/BauSystem/BauSystem_Main/src/BauSystem.properties b/BauSystem/BauSystem_Main/src/BauSystem.properties index 7cafc797..c9116dce 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem.properties @@ -308,7 +308,7 @@ SIMULATOR_POSITION_Z=§7z-Position SIMULATOR_BACK=§eBack SIMULATOR_GUI_TOTAL_TNT=§7Total TNT§8: §e{0} SIMULATOR_DELETED=§cSimulator deleted -SIMULATOR_RENAMED=§cSimulator renamed +SIMULATOR_RENAMED=§cSimulator renamed from {0} to {1} ## GUI SIMULATOR_POSITION_EDIT=§eEdit position SIMULATOR_POSITION_ADD=§eSet position diff --git a/BauSystem/BauSystem_Main/src/BauSystem_de.properties b/BauSystem/BauSystem_Main/src/BauSystem_de.properties index 77b31259..04588bc9 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem_de.properties @@ -291,7 +291,7 @@ SIMULATOR_POSITION_Z=§7z-Position SIMULATOR_BACK=§eZurück SIMULATOR_GUI_TOTAL_TNT=§7Gesamt TNT§8: §e{0} SIMULATOR_DELETED=§cSimulator gelöscht -SIMULATOR_RENAMED=§cSimulator umbenannt +SIMULATOR_RENAMED=§cSimulator von {0} zu {1} umbenannt ## GUI SIMULATOR_POSITION_EDIT=§ePosition bearbeiten SIMULATOR_POSITION_ADD=§ePosition setzen diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java index 199e8952..de0c4b74 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java @@ -20,7 +20,6 @@ package de.steamwar.bausystem.features.simulator; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.features.simulator.data.Simulator; import de.steamwar.bausystem.features.simulator.execute.SimulatorExecutor; @@ -63,15 +62,7 @@ public class SimulatorCommand extends SWCommand { } @Register(value = "copy", description = "SIMULATOR_COPY_HELP") - public void copy(@Validator Player p, @ErrorMessage("SIMULATOR_NOT_EXISTS") Simulator simulator, String name) { - if (SimulatorStorage.getSimulator(name) != null) { - BauSystem.MESSAGE.send("SIMULATOR_NAME_ALREADY_EXISTS", p); - return; - } - if (!name.matches("[a-zA-Z_0-9-]+")) { - BauSystem.MESSAGE.send("SIMULATOR_NAME_INVALID", p); - return; - } + public void copy(@Validator Player p, @ErrorMessage("SIMULATOR_NOT_EXISTS") Simulator simulator, @Validator("simulatorName") String name) { if (!SimulatorStorage.copy(simulator, name)) { BauSystem.MESSAGE.send("SIMULATOR_ERROR_COPY", p); } @@ -89,18 +80,11 @@ public class SimulatorCommand extends SWCommand { } @Register(value = "rename", description = "SIMULATOR_RENAME_HELP") - public void rename(@Validator Player p, @ErrorMessage("SIMULATOR_NOT_EXISTS") Simulator simulator, String name) { - if (SimulatorStorage.getSimulator(name) != null) { - BauSystem.MESSAGE.send("SIMULATOR_NAME_ALREADY_EXISTS", p); - return; - } - if (!name.matches("[a-zA-Z_0-9-]+")) { - BauSystem.MESSAGE.send("SIMULATOR_NAME_INVALID", p); - return; - } + public void rename(@Validator Player p, @ErrorMessage("SIMULATOR_NOT_EXISTS") Simulator simulator, @Validator("simulatorName") String name) { + String oldName = simulator.getName(); if (SimulatorStorage.copy(simulator, name)) { SimulatorStorage.delete(simulator); - BauSystem.MESSAGE.send("SIMULATOR_RENAMED", p); + BauSystem.MESSAGE.send("SIMULATOR_RENAMED", p, oldName, name); } else { BauSystem.MESSAGE.send("SIMULATOR_ERROR_COPY", p); } @@ -120,4 +104,19 @@ public class SimulatorCommand extends SWCommand { } }; } + + @Validator(value = "simulatorName", local = true) + public TypeValidator simulatorName() { + return (commandSender, name, messageSender) -> { + if (SimulatorStorage.getSimulator(name) != null) { + messageSender.send("SIMULATOR_NAME_ALREADY_EXISTS"); + return false; + } + if (!name.matches("[a-zA-Z_0-9-]+")) { + messageSender.send("SIMULATOR_NAME_INVALID"); + return false; + } + return true; + }; + } } From 52302dd284310a92b917a92c26540533b746534f Mon Sep 17 00:00:00 2001 From: TheBreadBeard Date: Thu, 29 Aug 2024 22:09:43 +0200 Subject: [PATCH 09/21] Add DiscordTicketType.SCHEMATIC --- VelocityCore/src/de/steamwar/messages/BungeeCore.properties | 1 + .../src/de/steamwar/messages/BungeeCore_de.properties | 1 + .../de/steamwar/velocitycore/discord/DiscordTicketType.java | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VelocityCore/src/de/steamwar/messages/BungeeCore.properties b/VelocityCore/src/de/steamwar/messages/BungeeCore.properties index 5bb5238b..2535aaf3 100644 --- a/VelocityCore/src/de/steamwar/messages/BungeeCore.properties +++ b/VelocityCore/src/de/steamwar/messages/BungeeCore.properties @@ -739,6 +739,7 @@ DC_TICKETINTRO_IDEA=Describe your idea as detailed as possible. Hereto belongs: DC_TICKETINTRO_BUG=Please describe the observed unexpected or incorrect behaviour of our software. If necessary describe steps to reproduce the error. DC_TICKETINTRO_QUESTION=Please ask your question. A staff member will address the question soon. DC_TICKETINTRO_APPEAL=Asking creates wonders. +DC_TICKETINTRO_SCHEMATIC=Please answer the following questions as precisely as possible for the locking of the Schematic and, if possible, add evidence:\n - Which player(s)?\n - On which Arena Server\n - At what time?\n - Rules which the Schematic violates (rules/code of conduct) DC_TICKET_CLOSE=Close DC_SCHEMUPLOAD_NOPERM=You\'re not allowed to upload schematics. diff --git a/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties b/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties index edc46c77..786ad244 100644 --- a/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties +++ b/VelocityCore/src/de/steamwar/messages/BungeeCore_de.properties @@ -692,6 +692,7 @@ DC_TICKETINTRO_IDEA=Beschreibe deine Idee möglichst detailiert. Hierzu gehört: DC_TICKETINTRO_BUG=Bitte beschreibe das beobachtete unerwartete bzw. inkorrekte Verhalten der Serversoftware. Falls notwendig, beschreibe die Schritte, mit denen der Fehler reproduziert werden kann. DC_TICKETINTRO_QUESTION=Bitte stelle deine Frage, ein Serverteammitglied wird sich dieser zeitnah annehmen. DC_TICKETINTRO_APPEAL=Fragen wirkt Wunder! +DC_TICKETINTRO_SCHEMATIC=Bitte beantworte für die sperrung der Schematic möglichst genau folgende Fragen und füge nach Möglichkeit Beweismaterial hinzu:\n - Welche(r) Spieler?\n - Auf welchem Arena Server\n - Zu welchem Zeitpunkt?\n - Regeln, gegen welche die Schematic verstößt (Regelwerk/ Verhaltensrichtlinien) DC_TICKET_CLOSE=Schließen DC_SCHEMUPLOAD_NOPERM=Du darfst keine Schematics hochladen. diff --git a/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordTicketType.java b/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordTicketType.java index 8cb67e6e..f9838e34 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordTicketType.java +++ b/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordTicketType.java @@ -30,7 +30,9 @@ public enum DiscordTicketType { IDEA("U+1F4A1", "Feature vorschlagen", ButtonStyle.SUCCESS), BUG("U+1F41B", "Bug melden", ButtonStyle.SECONDARY), QUESTION("U+2753", "Fragen", ButtonStyle.PRIMARY), - APPEAL("U+1F528", "Entbannungsantrag", ButtonStyle.SECONDARY); + APPEAL("U+1F528", "Entbannungsantrag", ButtonStyle.SECONDARY), + SCHEMATIC("U+1F4BE", "Schematic melden", ButtonStyle.DANGER); + private final String emoji; private final String label; From 04d9f38f7df3e7dc3c14fa4c8b1869fb75a6b3af Mon Sep 17 00:00:00 2001 From: TheBreadBeard Date: Thu, 29 Aug 2024 22:53:22 +0200 Subject: [PATCH 10/21] Add team changecolor command alias --- .../velocitycore/commands/TeamCommand.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java index 32b65e93..04225449 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java @@ -478,6 +478,21 @@ public class TeamCommand extends SWCommand { } @Register("color") + public void color(@Validator("isLeader") PlayerChatter sender) { + Team team = Team.get(sender.user().getTeam()); + + if(notDuringEvent(sender)) + return; + + SWListInv inv = new SWListInv<>(sender, new Message("TEAM_COLOR_TITLE"), COLOR_CODES.entrySet().stream().map(entry -> new SWListInv.SWListEntry<>(new SWItem(new Message("PLAIN_STRING", "§" + entry.getKey() + team.getTeamKuerzel()), entry.getValue()), entry.getKey())).toList(), (click, element) -> {}); + inv.setCallback((click, element) -> { + inv.close(); + team.setTeamColor(element); + }); + inv.open(); + } + + @Register("changecolor") public void changeColor(@Validator("isLeader") PlayerChatter sender) { Team team = Team.get(sender.user().getTeam()); From 1f908134a13a9939807196f5f966cf940b67ba83 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Fri, 30 Aug 2024 08:31:29 +0200 Subject: [PATCH 11/21] Hotfix DiscordBot --- .../velocitycore/discord/DiscordBot.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordBot.java b/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordBot.java index 5a80a04f..0c30a2ad 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordBot.java +++ b/VelocityCore/src/de/steamwar/velocitycore/discord/DiscordBot.java @@ -30,8 +30,14 @@ import de.steamwar.velocitycore.discord.listeners.DiscordTeamEvent; import de.steamwar.velocitycore.discord.listeners.DiscordTicketHandler; import de.steamwar.velocitycore.discord.util.AuthManager; import lombok.Getter; -import net.dv8tion.jda.api.*; -import net.dv8tion.jda.api.entities.*; +import net.dv8tion.jda.api.EmbedBuilder; +import net.dv8tion.jda.api.JDA; +import net.dv8tion.jda.api.JDABuilder; +import net.dv8tion.jda.api.OnlineStatus; +import net.dv8tion.jda.api.entities.Activity; +import net.dv8tion.jda.api.entities.Guild; +import net.dv8tion.jda.api.entities.Member; +import net.dv8tion.jda.api.entities.Role; import net.dv8tion.jda.api.entities.emoji.Emoji; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.exceptions.ErrorResponseException; @@ -136,13 +142,19 @@ public class DiscordBot { if(event.getComponentId().equals("auth")) event.reply("Gebe innerhalb der nächsten 10 Minuten ``/verify " + AuthManager.createDiscordAuthToken(event.getUser()) + "`` auf dem Minecraft Server ein").setEphemeral(true).queue(); }); + List actionRows = new ArrayList<>(); + List