currently refactoring a lot

This commit is contained in:
kento2 2026-07-04 12:25:54 +02:00
parent 7fe7409a15
commit a32805a623
46 changed files with 571 additions and 642 deletions

View file

@ -28,7 +28,7 @@ public class OnlineCommand implements CommandExecutor<CommandSource> {
}
@Override
public CompletableFuture<Result<Void,String>> execute(CommandContext<CommandSource> ctx) {
public CompletableFuture<Result<Object,String>> execute(CommandContext<CommandSource> ctx) {
int cnt = server.getPlayerCount();
var msg = cnt != 1
? "There are currently " + cnt + " players online"

View file

@ -37,7 +37,7 @@ public class MsgCommand implements CommandExecutor<CommandSource> {
}
@Override
public CompletableFuture<Result<Void,String>> execute(CommandContext<CommandSource> ctx) {
public CompletableFuture<Result<Object,String>> execute(CommandContext<CommandSource> ctx) {
var target = ctx.getArg(targetArg);
var msg = ctx.getArg(msgArg);
var sender = (Player)ctx.getSender();

View file

@ -34,7 +34,7 @@ public class ReplyCommand implements CommandExecutor<CommandSource> {
}
@Override
public CompletableFuture<Result<Void,String>> execute(CommandContext<CommandSource> ctx) {
public CompletableFuture<Result<Object,String>> execute(CommandContext<CommandSource> ctx) {
var sender = (Player)ctx.getSender();
var targetId = cache.getLastTarget(sender.getUniqueId());
var target = server.getPlayer(targetId).orElse(null);

View file

@ -39,7 +39,7 @@ public class ServerRegisterWatchdog {
.subscribe(null, e -> log.throwing(getClass().getName(), "listen", e));
}
private @NotNull Mono<@NotNull Void> handleStateChange(SubscriptionContext ctx, String state, String handle) {
private @NotNull Result<Object, String> handleStateChange(SubscriptionContext ctx, String state, String handle) {
return switch (state) {
case "UP" -> instanceManager.getInfo(handle)
.doOnNext(instance ->