Refactored servercommands, added tcp client, added command queue.

This commit is contained in:
lieght
2025-09-13 13:51:55 +02:00
parent c6bdbae46c
commit 3619791233
7 changed files with 190 additions and 84 deletions

View File

@@ -1,6 +1,7 @@
package org.toop.eventbus;
import org.toop.server.Server;
import org.toop.server.ServerCommand;
/**
* Events that are used in the GlobalEventBus class.
@@ -12,12 +13,12 @@ public class Events implements IEvents {
/**
* Triggers sending a command to a server.
*/
public record command(Server.Command command, String... args) {}
public record command(String command, String... args) {}
/**
* Triggers when a command is sent to a server.
*/
public record OnCommand(Server.Command command, String[] args, Server.Message result) {}
public record OnCommand(org.toop.server.ServerCommand command, String[] args, String result) {}
/**
* Triggers on changing the server backend.