From 644cc9da840b9bbc30a4fc5c36115160aa0c4b08 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 8 Mar 2025 15:58:50 +0100 Subject: [PATCH 01/11] Fix /arena bugs with event arenas --- VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java b/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java index a6707c45..56620468 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java +++ b/VelocityCore/src/de/steamwar/velocitycore/ServerStarter.java @@ -110,7 +110,7 @@ public class ServerStarter { fightMap = eventFight.getMap(); gameMode = eventFight.getSpielmodus(); - String serverName = Team.get(eventFight.getTeamBlue()).getTeamKuerzel() + " vs " + Team.get(eventFight.getTeamRed()).getTeamKuerzel(); + String serverName = Team.get(eventFight.getTeamBlue()).getTeamKuerzel() + "_vs_" + Team.get(eventFight.getTeamRed()).getTeamKuerzel(); serverNameProvider = port -> serverName; worldName = serverToWorldName(serverName + eventFight.getStartTime().toLocalDateTime().format(DateTimeFormatter.ISO_TIME)); return this; From b60111e717c10c345c4bf4d7e4792e725ff866a7 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sat, 8 Mar 2025 17:44:46 +0100 Subject: [PATCH 02/11] Hotfix ShieldPrinting pasting AIR, it should not --- .../bausystem/features/shieldprinting/ShieldPrinting.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java index 28a65a99..780c2bb3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java @@ -177,6 +177,9 @@ public class ShieldPrinting implements Listener { BlockData worldOriginal = block.getBlockData(); BlockData copied = entry.getValue().clone(); + if (copied.getMaterial().isAir()) { + continue; + } for (BlockDataConfiguration blockDataConfiguration : stateConfigurations) { if (blockDataConfiguration == null) continue; blockDataConfiguration.apply(copied, worldOriginal); From 17eaefe3d0379d951bc0bf49c39ba679ff11b354 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sat, 8 Mar 2025 17:51:41 +0100 Subject: [PATCH 03/11] Hotfix ShieldPrinting pasting AIR, it should not --- .../bausystem/features/shieldprinting/ShieldPrinting.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java index 780c2bb3..329ad9f4 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java @@ -170,13 +170,16 @@ public class ShieldPrinting implements Listener { } BlockDataConfiguration[] stateConfigurations = stateConfiguration.get(entry.getValue().getMaterial()); + BlockData copied = entry.getValue(); if (stateConfigurations == null) { - block.setBlockData(entry.getValue(), false); + if (!copied.getMaterial().isAir()) { + block.setBlockData(copied, false); + } continue; } BlockData worldOriginal = block.getBlockData(); - BlockData copied = entry.getValue().clone(); + copied = copied.clone(); if (copied.getMaterial().isAir()) { continue; } From 82723e4c315a96c5bd9e5f473b8ea59b407461db Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sat, 8 Mar 2025 18:34:22 +0100 Subject: [PATCH 04/11] Hotfix ShieldPrinting pasting AIR, it should not --- .../features/shieldprinting/ShieldPrinting.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java index 329ad9f4..e3b60f1e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/shieldprinting/ShieldPrinting.java @@ -160,6 +160,11 @@ public class ShieldPrinting implements Listener { private void paste(Map[]> stateConfiguration) { for (Map.Entry entry : shieldData.entrySet()) { + BlockData copied = entry.getValue(); + if (copied.getMaterial().isAir()) { + continue; + } + Block block = entry.getKey().toLocation(WORLD).getBlock(); if (entry.getValue().getMaterial() != block.getType()) { block.setBlockData(entry.getValue(), false); @@ -170,19 +175,12 @@ public class ShieldPrinting implements Listener { } BlockDataConfiguration[] stateConfigurations = stateConfiguration.get(entry.getValue().getMaterial()); - BlockData copied = entry.getValue(); if (stateConfigurations == null) { - if (!copied.getMaterial().isAir()) { - block.setBlockData(copied, false); - } continue; } BlockData worldOriginal = block.getBlockData(); copied = copied.clone(); - if (copied.getMaterial().isAir()) { - continue; - } for (BlockDataConfiguration blockDataConfiguration : stateConfigurations) { if (blockDataConfiguration == null) continue; blockDataConfiguration.apply(copied, worldOriginal); From 96c25687b64a72fcf131c7ff9b1183130a7d0b31 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sat, 8 Mar 2025 22:16:39 +0100 Subject: [PATCH 05/11] Hotfix SendCommand --- .../de/steamwar/velocitycore/commands/SendCommand.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/SendCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/SendCommand.java index 1a5ba9f5..f1590957 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/SendCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/SendCommand.java @@ -49,11 +49,15 @@ public class SendCommand extends SWCommand { @Register("to") public void sendCommand(Chatter sender, RegisteredServer toServer, Player... players) { String serverName = toServer.getServerInfo().getName(); + int count = 0; for (Player player : players) { - player.createConnectionRequest(toServer).fireAndForget(); - Chatter.of(player).send(true, null, null, new Message("SEND_MESSAGE", sender.user().getUserName(), serverName)); + if (sender.user().hasPerm(UserPerm.ADMINISTRATION) || check(sender.user(), player.getCurrentServer().map(ServerConnection::getServer).orElse(null))) { + player.createConnectionRequest(toServer).fireAndForget(); + Chatter.of(player).send(true, null, null, new Message("SEND_MESSAGE", sender.user().getUserName(), serverName)); + count++; + } } - sender.send(true, null, null, new Message("SEND_MESSAGE_SELF", players.length, serverName)); + sender.send(true, null, null, new Message("SEND_MESSAGE_SELF", count, serverName)); } private boolean check(SteamwarUser user, RegisteredServer registeredServer) { From 2225b811fa13146a9a78e9b4ba18beea00f15434 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sun, 9 Mar 2025 18:18:13 +0100 Subject: [PATCH 06/11] Update Bossbar of FightSystem --- .../fightsystem/FightSystem.properties | 18 +++++++++--------- .../fightsystem/FightSystem_de.properties | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties index 3d9a9218..dde4e266 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem.properties @@ -176,15 +176,15 @@ UI_WIN={0}Victory {1} UI_DRAW=§7Draw BAR_PRE_LEADER=§7Waiting for team leader -BAR_PRE_SCHEM={1} §7Schematic selection {0} {2} -BAR_PREPARE={1} {3} §7Preparation {0} {4} {2} -BAR_PRE_RUNNING={1} {3} §7Start of fight in {0} {4} {2} -BAR_RUNNING0={1} {3} {0} {4} {2} -BAR_RUNNING1={1} {3} {5} {0} {6} {4} {2} -BAR_RUNNING2={1} {3} {5} {7} {0} {6} {8} {4} {2} -BAR_RUNNING3={1} {3} {5} {7} {9} {0} {6} {8} {10} {4} {2} -BAR_TIE={1} §7Draw {0} {2} -BAR_WIN={1} §7Victory {3} {0} {2} +BAR_PRE_SCHEM = {1} §7Schematic selection {0} {2} +BAR_PREPARE = {1} {3} §7Preparation {0} {4} {2} +BAR_PRE_RUNNING = {1} {3} §7Start of fight in {0} {4} {2} +BAR_RUNNING0 = {1} {3} {0} {4} {2} +BAR_RUNNING1 = {1} {3} {5} {0} {6} {4} {2} +BAR_RUNNING2 = {1} {3} {5} {7} {0} {6} {8} {4} {2} +BAR_RUNNING3 = {1} {3} {5} {7} {9} {0} {6} {8} {10} {4} {2} +BAR_TIE = {1} §7Draw {0} {2} +BAR_WIN = {1} §7Victory {3} {0} {2} BAR_POINTS={0} §8Points BAR_POINTS_OF={0}§8/§7{1} §8Points BAR_PERCENT={0}§8% diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties index d45cdfd0..470226a8 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/FightSystem_de.properties @@ -161,11 +161,11 @@ UI_WIN={0}Sieg {1} UI_DRAW=§7Unentschieden BAR_PRE_LEADER=§7Warten auf Teamleader -BAR_PRE_SCHEM={1} §7Schemauswahl {0} {2} -BAR_PREPARE={1} {3} §7Vorbereitung {0} {4} {2} -BAR_PRE_RUNNING={1} {3} §7Kampfbeginn in {0} {4} {2} -BAR_TIE={1} §7Unentschieden {0} {2} -BAR_WIN={1} §7Sieg {3} {0} {2} +BAR_PRE_SCHEM = {1} §7Schemauswahl {0} {2} +BAR_PREPARE = {1} {3} §7Vorbereitung {0} {4} {2} +BAR_PRE_RUNNING = {1} {3} §7Kampfbeginn in {0} {4} {2} +BAR_TIE = {1} §7Unentschieden {0} {2} +BAR_WIN = {1} §7Sieg {3} {0} {2} BAR_POINTS={0} §8Punkte BAR_POINTS_OF={0}§8/§7{1} §8Punkte BAR_PERCENT={0}§8% From 1d293b446c10baa8e32f608cbff617c94b68ec1a Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Tue, 11 Mar 2025 18:31:31 +0100 Subject: [PATCH 07/11] Hotfix WhoisCommand for Developers not showing the User ID --- .../src/de/steamwar/velocitycore/commands/WhoisCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/WhoisCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/WhoisCommand.java index 4daa5b78..2fc6f08d 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/WhoisCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/WhoisCommand.java @@ -71,7 +71,7 @@ public class WhoisCommand extends SWCommand { if (!sender.user().hasPerm(UserPerm.TEAM)) return; - if (sender.user().hasPerm(UserPerm.MODERATION)) { + if (sender.user().hasPerm(UserPerm.MODERATION) || sender.user().hasPerm(UserPerm.PREFIX_DEVELOPER)) { sender.system("WHOIS_ID", user.getId()); sender.system("WHOIS_UUID", new Message("WHOIS_UUID_HOVER"), ClickEvent.copyToClipboard(user.getUUID().toString()), user.getUUID().toString()); if (user.getDiscordId() != null) From 30cb09c127a508fc581c761135594a64cc42cd7f Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 13 Mar 2025 16:36:34 +0100 Subject: [PATCH 08/11] Hotfix ELO on leave --- MissileWars/src/de/steamwar/misslewars/MWTeam.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MissileWars/src/de/steamwar/misslewars/MWTeam.java b/MissileWars/src/de/steamwar/misslewars/MWTeam.java index 7d4224dc..8abc5bc9 100644 --- a/MissileWars/src/de/steamwar/misslewars/MWTeam.java +++ b/MissileWars/src/de/steamwar/misslewars/MWTeam.java @@ -185,7 +185,6 @@ public class MWTeam { public void leave(Player p) { if (!players.contains(p)) return; - players.remove(p); for (ItemStack stack : p.getInventory().getContents()) { if (stack == null) continue; if (stack.getType() == Material.AIR) continue; @@ -196,9 +195,11 @@ public class MWTeam { p.getInventory().clear(); p.setDisplayName("§7" + p.getName()); - sbteam.removePlayer(p); if (players.isEmpty() && MissileWars.getFightState() == FightState.FIGHTING) MissileWars.end(WinReasons.NO_ENEMY, enemy()); + + players.remove(p); + sbteam.removePlayer(p); } public void reset() { From 34e4cd706033720066d11316794efef13f6270cf Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 13 Mar 2025 16:53:37 +0100 Subject: [PATCH 09/11] Add click on SimulatorMaterialGui to change material --- .../features/simulator/gui/SimulatorMaterialGui.java | 10 ++++++++++ .../features/simulator/gui/base/SimulatorBaseGui.java | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorMaterialGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorMaterialGui.java index 84f1e682..f081374d 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorMaterialGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/SimulatorMaterialGui.java @@ -53,6 +53,16 @@ public class SimulatorMaterialGui extends SimulatorPageGui { this.back = back; } + @Override + public boolean shouldOpen() { + if (player.getItemOnCursor().getType().isAir()) { + return true; + } + change.accept(player.getItemOnCursor().getType()); + SimulatorWatcher.update(simulator); + return false; + } + @Override public String baseTitle() { return "Material"; diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java index e3ddd797..6fa35d4c 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/gui/base/SimulatorBaseGui.java @@ -46,6 +46,8 @@ public abstract class SimulatorBaseGui { } public final void open() { + if (!shouldOpen()) return; + String newTitle = title(); String originalTitle = player.getOpenInventory().getTitle(); @@ -86,6 +88,10 @@ public abstract class SimulatorBaseGui { inventory.open(); } + public boolean shouldOpen() { + return true; + } + private void setup() { for (int i = 0; i < 9; i++) { inventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§8", clickType -> { From 9eca9ab9904b6ba85a5993531160932157ef918c Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 13 Mar 2025 17:04:59 +0100 Subject: [PATCH 10/11] Add DepthCommand to toggle Depth Counter --- .../BauSystem_Main/src/BauSystem.properties | 2 + .../src/BauSystem_de.properties | 2 + .../features/cannon/depth/Depth.java | 5 ++- .../features/cannon/depth/DepthCommand.java | 45 +++++++++++++++++++ 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthCommand.java diff --git a/BauSystem/BauSystem_Main/src/BauSystem.properties b/BauSystem/BauSystem_Main/src/BauSystem.properties index 929d0c67..e4dc1b27 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem.properties @@ -406,6 +406,8 @@ BLOCK_COUNTER_MESSAGE_SECOND=§7Damage §8> §e{0} §7Blocks §e{1} §7TNT §e BLOCK_COUNTER_ENABLE=§7BlockCounter activated BLOCK_COUNTER_DISABLE=§7BlockCounter deactivated # DepthCounter +DEPTH_COUNTER_DISABLE=§7Depth Counter disabled +DEPTH_COUNTER_ENABLE=§7Depth Counter enabled DEPTH_COUNTER_MESSAGE=§7Depth §8> §7 DEPTH_COUNTER_COUNT={0}{1}§8×{2}{3}§8×{4}{5} DEPTH_COUNTER_HOVER=§7X§8×§7Y§8×§7Z diff --git a/BauSystem/BauSystem_Main/src/BauSystem_de.properties b/BauSystem/BauSystem_Main/src/BauSystem_de.properties index 4cb20d95..ea6826ed 100644 --- a/BauSystem/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem/BauSystem_Main/src/BauSystem_de.properties @@ -369,6 +369,8 @@ BLOCK_COUNTER_MESSAGE_SECOND=§7Schaden §8> §e{0} §7Blöcke §e{1} §7TNT BLOCK_COUNTER_ENABLE=§7BlockCounter angemacht BLOCK_COUNTER_DISABLE=§7BlockCounter ausgemacht # DepthCounter +DEPTH_COUNTER_DISABLE=§7Depth Counter deaktiviert +DEPTH_COUNTER_ENABLE=§7Depth Counter aktiviert DEPTH_COUNTER_MESSAGE=§7Tiefe §8> §7 # TPSLimit TPSLIMIT_FREEZE_HELP=§8/§etpslimit 0 §8-§7 Friere TPS ein diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/Depth.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/Depth.java index a13d6250..22ce7fde 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/Depth.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/Depth.java @@ -20,6 +20,7 @@ package de.steamwar.bausystem.features.cannon.depth; import de.steamwar.bausystem.BauSystem; +import de.steamwar.bausystem.configplayer.Config; import de.steamwar.bausystem.region.Region; import de.steamwar.bausystem.region.RegionUtils; import de.steamwar.bausystem.region.utils.RegionExtensionType; @@ -65,7 +66,9 @@ public class Depth { dimensions.setZ(Math.abs(dimensions.getZ())); RegionUtils.message(region, player -> { - player.spigot().sendMessage(getMessage(player, dimensions.getBlockX() + 1, dimensions.getBlockY() + 1, dimensions.getBlockZ() + 1, tntCount)); + if (Config.getInstance().get(player).getPlainValueOrDefault("depth_message", true)) { + player.spigot().sendMessage(getMessage(player, dimensions.getBlockX() + 1, dimensions.getBlockY() + 1, dimensions.getBlockZ() + 1, tntCount)); + } }); } diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthCommand.java new file mode 100644 index 00000000..b7426fd7 --- /dev/null +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/cannon/depth/DepthCommand.java @@ -0,0 +1,45 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2020 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 . + */ + +package de.steamwar.bausystem.features.cannon.depth; + +import de.steamwar.bausystem.BauSystem; +import de.steamwar.bausystem.configplayer.Config; +import de.steamwar.command.SWCommand; +import de.steamwar.linkage.Linked; +import org.bukkit.entity.Player; + +@Linked +public class DepthCommand extends SWCommand { + + public DepthCommand() { + super("depth"); + } + + @Register + public void toggle(Player player) { + if (Config.getInstance().get(player).getPlainValueOrDefault("depth_message", true)) { + Config.getInstance().get(player).put("depth_message", false); + BauSystem.MESSAGE.send("DEPTH_COUNTER_DISABLE", player); + } else { + Config.getInstance().get(player).put("depth_message", true); + BauSystem.MESSAGE.send("DEPTH_COUNTER_ENABLE", player); + } + } +} From 50b69473121d51dfa9ce9fe1699eb8db7f967ef0 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Thu, 13 Mar 2025 17:14:17 +0100 Subject: [PATCH 11/11] Hotfix DiscordChatRoom --- VelocityCore/src/de/steamwar/messages/Chatter.java | 8 ++++++-- .../velocitycore/discord/channels/DiscordChatRoom.java | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/VelocityCore/src/de/steamwar/messages/Chatter.java b/VelocityCore/src/de/steamwar/messages/Chatter.java index 2e67354c..607b4fd2 100644 --- a/VelocityCore/src/de/steamwar/messages/Chatter.java +++ b/VelocityCore/src/de/steamwar/messages/Chatter.java @@ -213,10 +213,14 @@ public interface Chatter { } static Chatter of(SteamwarUser user) { - return of(user.getUUID()); + return of(user.getUUID(), false); } static Chatter of(UUID uuid) { + return of(uuid, false); + } + + static Chatter of(UUID uuid, boolean playerlessChatShown) { Player player = VelocityCore.getProxy().getPlayer(uuid).orElse(null); if(player != null) return Chatter.of(player); @@ -229,7 +233,7 @@ public interface Chatter { @Override public boolean chatShown() { - return false; + return playerlessChatShown; } @Override diff --git a/VelocityCore/src/de/steamwar/velocitycore/discord/channels/DiscordChatRoom.java b/VelocityCore/src/de/steamwar/velocitycore/discord/channels/DiscordChatRoom.java index ce54b2d5..7b05357c 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/discord/channels/DiscordChatRoom.java +++ b/VelocityCore/src/de/steamwar/velocitycore/discord/channels/DiscordChatRoom.java @@ -47,6 +47,6 @@ public class DiscordChatRoom extends DiscordChannel { return; } - ChatListener.sendChat(Chatter.of(user), target.get(), format, null, event.getMessage().getContentDisplay().replace('§', '&').replace('\n', ' ')); + ChatListener.sendChat(Chatter.of(user.getUUID(), true), target.get(), format, null, event.getMessage().getContentDisplay().replace('§', '&').replace('\n', ' ')); } }