currently refactoring a lot
This commit is contained in:
parent
7fe7409a15
commit
a32805a623
46 changed files with 571 additions and 642 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue