mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: b79bc31 Fix MerchantOffer BuyB Only AssertionError (#6206) d6c81c8 Don't apply cramming damage to players (#5903) 12942dc Add rate options and timings for sensors and behaviors (#6027) fc47872 Use mapped names for sensor and behavior timings/config (#6228) c75a837 Don't expose ASM in API (#6229) c225bf9 Fix book title and author being improperly serialized as components (#6190) f25facb Update email & name (DenWav) 44516b1 [ci skip] Put mappings util in a separate class to the stacktrace deobfuscator
40 lines
3.2 KiB
Diff
40 lines
3.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ben Kerllenevich <me@notom3ga.me>
|
|
Date: Wed, 19 May 2021 15:33:43 -0400
|
|
Subject: [PATCH] Config for unverified username message
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
index 45e77d96f673ce68cf15ce3d45fd1eeffed4d8d8..811b48e0b91e2af30a122b72803591e48519e6a9 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
@@ -304,7 +304,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
|
ServerLoginPacketListenerImpl.this.gameProfile = ServerLoginPacketListenerImpl.this.createFakeProfile(gameprofile);
|
|
ServerLoginPacketListenerImpl.this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
|
|
} else {
|
|
- ServerLoginPacketListenerImpl.this.disconnect(new TranslatableComponent("multiplayer.disconnect.unverified_username"));
|
|
+ ServerLoginPacketListenerImpl.this.disconnect(net.pl3x.purpur.PurpurConfig.unverifiedUsername.equals("default") ? new TranslatableComponent("multiplayer.disconnect.unverified_username") : PaperAdventure.asVanilla(net.kyori.adventure.text.minimessage.MiniMessage.get().parse(net.pl3x.purpur.PurpurConfig.unverifiedUsername))); // Purpur
|
|
ServerLoginPacketListenerImpl.LOGGER.error("Username '{}' tried to join with an invalid session", gameprofile.getName());
|
|
}
|
|
} catch (AuthenticationUnavailableException authenticationunavailableexception) {
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index 45626d15e91ac2c0fa745f2670d3877a7387e0d2..aa9bed62b71894b74f86ee1016d192293a702fd1 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -166,6 +166,7 @@ public class PurpurConfig {
|
|
public static String demoCommandOutput = "<green>%s has been shown the demo screen";
|
|
public static String pingCommandOutput = "<green>%s's ping is %sms";
|
|
public static String dontRunWithScissors = "<red><italic>Don't run with scissors!";
|
|
+ public static String unverifiedUsername = "default";
|
|
private static void messages() {
|
|
cannotRideMob = getString("settings.messages.cannot-ride-mob", cannotRideMob);
|
|
afkBroadcastAway = getString("settings.messages.afk-broadcast-away", afkBroadcastAway);
|
|
@@ -176,6 +177,7 @@ public class PurpurConfig {
|
|
demoCommandOutput = getString("settings.messages.demo-command-output", demoCommandOutput);
|
|
pingCommandOutput = getString("settings.messages.ping-command-output", pingCommandOutput);
|
|
dontRunWithScissors = getString("settings.messages.dont-run-with-scissors", dontRunWithScissors);
|
|
+ unverifiedUsername = getString("settings.messages.unverified-username", unverifiedUsername);
|
|
}
|
|
|
|
public static boolean advancementOnlyBroadcastToAffectedPlayer = false;
|