mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@990be16 Iterate over entity array copy for entity scheduler PaperMC/Paper@3f6c4b0 Add event for player editing sign (#9300) PaperMC/Paper@7103f81 Only tick item frames if players can see it (#9377) PaperMC/Paper@cf0f013 Avoid duplicate death event call for armorstands (#9223) PaperMC/Paper@8582999 Deprecate duplicate chat completion methods (#9401) PaperMC/Paper@e4b40dd Fix entity selectors while spectating (#9402) PaperMC/Paper@82cd69f [ci skip] Update Repo style and change project url in README (#9407) PaperMC/Paper@2c9c5e4 Fix replenishable container entities save/load existing contents (#9417) PaperMC/Paper@437e8da Improve command function perm level checks (#9411) PaperMC/Paper@225c950 Hotfix double entity removal making entity scheduler retire call PaperMC/Paper@fead63e Add option to disable NoteBlock and Tripwire updates (#9368) Pufferfish Changes: pufferfish-gg/Pufferfish@50f3124 Updated Upstream (Paper) pufferfish-gg/Pufferfish@5673490 Add option to suppress null ID disconnections in logs pufferfish-gg/Pufferfish@1e911fb Fix issue with that last patch
40 lines
3.2 KiB
Diff
40 lines
3.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ben Kerllenevich <ben@omega24.dev>
|
|
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 878001928327d92423d5f7f6d5ce8772d6fa477f..b4b88a3d4dc66c44ca8f3bad1025c17a9993ac1d 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
@@ -340,7 +340,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
|
ServerLoginPacketListenerImpl.this.gameProfile = gameprofile;
|
|
ServerLoginPacketListenerImpl.this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
|
|
} else {
|
|
- ServerLoginPacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.unverified_username"));
|
|
+ ServerLoginPacketListenerImpl.this.disconnect(org.purpurmc.purpur.PurpurConfig.unverifiedUsername.equals("default") ? Component.translatable("multiplayer.disconnect.unverified_username") : io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(org.purpurmc.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/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
index 3a328537042c3db3cb540b3d0c07a4ea1053f22d..968655055d534f35169dea50d540245e1b1c37cc 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
|
@@ -184,6 +184,7 @@ public class PurpurConfig {
|
|
public static String pingCommandOutput = "<green>%s's ping is %sms";
|
|
public static String tpsbarCommandOutput = "<green>Tpsbar toggled <onoff> for <target>";
|
|
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);
|
|
@@ -196,6 +197,7 @@ public class PurpurConfig {
|
|
pingCommandOutput = getString("settings.messages.ping-command-output", pingCommandOutput);
|
|
tpsbarCommandOutput = getString("settings.messages.tpsbar-command-output", tpsbarCommandOutput);
|
|
dontRunWithScissors = getString("settings.messages.dont-run-with-scissors", dontRunWithScissors);
|
|
+ unverifiedUsername = getString("settings.messages.unverified-username", unverifiedUsername);
|
|
}
|
|
|
|
public static String deathMsgRunWithScissors = "<player> slipped and fell on their shears";
|