Initial 1.18 update
This commit is contained in:
@@ -61,6 +61,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public void handleHello(ServerboundHelloPacket packet) {
|
||||
Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet", new Object[0]);
|
||||
this.gameProfile = packet.getGameProfile();
|
||||
Validate.validState(ServerLoginPacketListenerImpl.isValidUsername(this.gameProfile.getName()), "Invalid characters in username", new Object[0]);
|
||||
+ // Paper start - validate usernames
|
||||
+ if (com.destroystokyo.paper.PaperConfig.isProxyOnlineMode() && com.destroystokyo.paper.PaperConfig.performUsernameValidation) {
|
||||
+ if (!this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation && !validateUsername(this.gameProfile.getName())) {
|
||||
|
||||
Reference in New Issue
Block a user