geforkt von Mirrors/Paper
835bc39b03
Updated Upstream (Bukkit/CraftBukkit/Spigot) Bukkit Changes: 2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields e0fc6572 SPIGOT-4309: Add "forced" display of particles efeeab2f Add index to README.md for easier navigation f502bc6f Update to Minecraft 1.13.1 CraftBukkit Changes:d0bb0a1d
Fix some tests randomly failing997d378d
Fix client stall in specific teleportation scenariosb3dc2366
SPIGOT-4307: Fix hacky API for banners on shields2a271162
SPIGOT-4301: Fix more invalid enchants5d0d83bb
SPIGOT-4309: Add "forced" display of particlesa6772578
Add additional tests for CraftBlockDatace1af0c3
Update to Minecraft 1.13.1 Spigot Changes: 2440e189 Rebuild patches 4ecffced Update to Minecraft 1.13.1
47 Zeilen
2.5 KiB
Diff
47 Zeilen
2.5 KiB
Diff
From d85c759a84dfcc06cc74027447ae85e4bb4bf00e 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 e97dbaf8e3..45863c017c 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;
|
|
@@ -280,4 +281,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 8bbea96240..10c82107d4 100644
|
|
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
|
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
|
@@ -240,6 +240,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.18.0
|
|
|