Changed kick message when no valid account is selected
Some checks failed
build-docker / build (push) Has been cancelled
build / build (push) Has been cancelled

This commit is contained in:
RaphiMC 2025-01-03 22:49:36 +01:00
parent 9748b586f5
commit 58f05b820b
No known key found for this signature in database
GPG key ID: 0F6BB0657A03AC94
2 changed files with 6 additions and 3 deletions

View file

@ -17,10 +17,13 @@
*/
package net.raphimc.viaproxy.plugins.events.types;
public abstract class EventCancellable {
import net.lenni0451.lambdaevents.types.ICancellableEvent;
public abstract class EventCancellable implements ICancellableEvent {
private boolean cancelled = false;
@Override
public boolean isCancelled() {
return this.cancelled;
}

View file

@ -109,7 +109,7 @@ public class ExternalInterface {
proxyConnection.kickClient("§cFailed to authenticate with Mojang servers! Please try again in a couple of seconds.");
}
} else if (!ViaProxy.EVENT_MANAGER.call(new JoinServerRequestEvent(proxyConnection, serverIdHash)).isCancelled()) {
proxyConnection.kickClient("§cThis server is in online mode and requires a valid authentication mode.");
proxyConnection.kickClient("§cThe configured target server is in online mode and requires a valid authentication mode.");
}
} catch (CloseAndReturn e) {
throw e;
@ -131,7 +131,7 @@ public class ExternalInterface {
});
packet.salt = salt;
} else {
proxyConnection.kickClient("§cThis server requires a signed nonce. Please enable chat signing in the config and select a valid authentication mode.");
proxyConnection.kickClient("§cThe configured target server requires a signed nonce. Please enable chat signing in the config and select a valid authentication mode.");
}
}