geforkt von Mirrors/Paper
Allow specifying a custom "authentication servers down" kick message
Thanks to @phenomax in #855
Dieser Commit ist enthalten in:
Ursprung
7fc4d26c3f
Commit
cc7b5ac739
@ -0,0 +1,44 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Riley Park <rileysebastianpark@gmail.com>
|
||||
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 f4b23703..f5cb9799 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@
|
||||
package com.destroystokyo.paper;
|
||||
|
||||
+import com.google.common.base.Strings;
|
||||
import com.google.common.base.Throwables;
|
||||
|
||||
import java.io.File;
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
@@ -0,0 +0,0 @@ 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");
|
||||
}
|
||||
--
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren