Merge pull request 'Add tech hider bug handling for arena subservers in BugCommand' (#62) from bug-auto-techhider-bug into main
All checks were successful
SteamWarCI Build successful

Reviewed-on: #62
Reviewed-by: Lixfel <lixfel@noreply.localhost>
This commit is contained in:
2025-05-29 14:27:56 +02:00

View File

@ -19,9 +19,11 @@
package de.steamwar.velocitycore.commands;
import de.steamwar.persistent.Subserver;
import de.steamwar.sql.SWException;
import de.steamwar.command.SWCommand;
import de.steamwar.messages.Chatter;
import de.steamwar.velocitycore.SubserverSystem;
public class BugCommand extends SWCommand {
public BugCommand() {
@ -35,5 +37,9 @@ public class BugCommand extends SWCommand {
sender.withPlayerOrOffline(player -> player.getCurrentServer().map(connection -> connection.getServerInfo().getName()).orElse("offline"), () -> "offline") + " " + sender.user().getUserName() + " " + sender.user().getId()
);
sender.system("BUG_MESSAGE", id);
if (Subserver.isArena(Subserver.getSubserver(sender.getPlayer()))) {
sender.getPlayer().spoofChatInput("/techhiderbug");
}
}
}