mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 01:10:37 +01:00
6f2009754d
At the time this was re-added, there was concern around how the JIT would handle the system property that enabled it. This shouldn't be a problem, and as such we no longer need to block access to it. The Vanilla Method Profiler will not provide much to most users however there is no harm in providing it as an option. For most users, the recommended and supported method for determining performance issues with Paper will continue to be Timings.
47 lines
2.5 KiB
Diff
47 lines
2.5 KiB
Diff
From cc4dbb1de0f22f088fbe86a6323b98dbc3227ef3 Mon Sep 17 00:00:00 2001
|
|
From: kashike <kashike@vq.lc>
|
|
Date: Thu, 17 Aug 2017 16:08:20 -0700
|
|
Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
|
|
message
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
index dbafef02..ec89ecfc 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
@@ -1,5 +1,6 @@
|
|
package com.destroystokyo.paper;
|
|
|
|
+import com.google.common.base.Strings;
|
|
import com.google.common.base.Throwables;
|
|
|
|
import java.io.File;
|
|
@@ -276,4 +277,9 @@ public class PaperConfig {
|
|
private static void suggestPlayersWhenNull() {
|
|
suggestPlayersWhenNullTabCompletions = getBoolean("settings.suggest-player-names-when-null-tab-completions", suggestPlayersWhenNullTabCompletions);
|
|
}
|
|
+
|
|
+ public static String authenticationServersDownKickMessage = ""; // empty = use translatable message
|
|
+ private static void authenticationServersDownKickMessage() {
|
|
+ authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
|
index c5434e6b..75df9283 100644
|
|
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
|
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
|
@@ -250,6 +250,10 @@ public class LoginListener implements PacketLoginInListener, ITickable {
|
|
LoginListener.this.i = LoginListener.this.a(gameprofile);
|
|
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
|
} else {
|
|
+ // Paper start
|
|
+ if (com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage != null) {
|
|
+ LoginListener.this.disconnect(new ChatComponentText(com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage));
|
|
+ } else // Paper end
|
|
LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.authservers_down", new Object[0]));
|
|
LoginListener.c.error("Couldn\'t verify username because servers are unavailable");
|
|
}
|
|
--
|
|
2.14.3
|
|
|