Skip to content

Commit

Permalink
Changed kick message when no valid account is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed Jan 3, 2025
1 parent 9748b58 commit 58f05b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static void joinServer(final String serverIdHash, final ProxyConnection p
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;
Expand All @@ -131,7 +131,7 @@ public static void signNonce(final byte[] nonce, final C2SLoginKeyPacket packet,
});
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.");
}
}

Expand Down

0 comments on commit 58f05b8

Please sign in to comment.