mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
Add outdated client / server messages to config
This commit is contained in:
parent
85480c7faa
commit
31e1e0e950
@ -1,9 +1,25 @@
|
||||
From 728f823b45af1acf6d6d8a793422efe5b79001a6 Mon Sep 17 00:00:00 2001
|
||||
From a57de3891055b3e336f9439fe3f7cb84341c0560 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Fri, 21 Jun 2013 19:21:58 +1000
|
||||
Subject: [PATCH] Configurable Messages
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
index e634575..41f963d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
|
||||
@@ -79,9 +79,9 @@ public class PendingConnection extends Connection {
|
||||
|
||||
if (packet2handshake.d() != 74) {
|
||||
if (packet2handshake.d() > 74) {
|
||||
- this.disconnect("Outdated server!");
|
||||
+ this.disconnect(org.spigotmc.SpigotConfig.outdatedServerMessage); // Spigot
|
||||
} else {
|
||||
- this.disconnect("Outdated client!");
|
||||
+ this.disconnect(org.spigotmc.SpigotConfig.outdatedClientMessage); // Spigot
|
||||
}
|
||||
} else {
|
||||
this.loginKey = this.server.getOnlineMode() ? Long.toString(random.nextLong(), 16) : "-";
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 38e0c5b..262682d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@ -44,7 +60,7 @@ index 267605b..100396f 100644
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 85369ed..67603b3 100644
|
||||
index 85369ed..53c66fc 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -15,6 +15,7 @@ import java.util.Map;
|
||||
@ -55,7 +71,7 @@ index 85369ed..67603b3 100644
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.craftbukkit.command.TicksPerSecondCommand;
|
||||
@@ -246,4 +247,18 @@ public class SpigotConfig
|
||||
@@ -246,4 +247,22 @@ public class SpigotConfig
|
||||
{
|
||||
tabComplete = getBoolean( "commands.tab-complete", true );
|
||||
}
|
||||
@ -63,6 +79,8 @@ index 85369ed..67603b3 100644
|
||||
+ public static String whitelistMessage;
|
||||
+ public static String unknownCommandMessage;
|
||||
+ public static String serverFullMessage;
|
||||
+ public static String outdatedClientMessage;
|
||||
+ public static String outdatedServerMessage;
|
||||
+ private static String transform(String s)
|
||||
+ {
|
||||
+ return ChatColor.translateAlternateColorCodes( '&', s ).replaceAll( "\\n", "\n" );
|
||||
@ -72,6 +90,8 @@ index 85369ed..67603b3 100644
|
||||
+ whitelistMessage = transform( getString( "messages.whitelist", "You are not whitelisted on this server!" ) );
|
||||
+ unknownCommandMessage = transform( getString( "messages.unknown-command", "Unknown command. Type \"/help\" for help." ) );
|
||||
+ serverFullMessage = transform( getString( "messages.server-full", "The server is full!" ) );
|
||||
+ outdatedClientMessage = transform( getString( "messages.outdated-client", "Outdated client!" ) );
|
||||
+ outdatedServerMessage = transform( getString( "messages.outdated-server", "Outdated server!" ) );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
|
@ -1,4 +1,4 @@
|
||||
From aacbd4f9062073b65ce0146664f29bab64b26c3f Mon Sep 17 00:00:00 2001
|
||||
From afad711eee092e4bb80ae47517977f66e2d4aaef Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 22 Jun 2013 16:40:11 +1000
|
||||
Subject: [PATCH] Add Log Filtering
|
||||
@ -35,7 +35,7 @@ index 0000000..aa7e9ab
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 67603b3..ea17712 100644
|
||||
index 53c66fc..296c581 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -13,6 +13,8 @@ import java.util.HashMap;
|
||||
@ -47,9 +47,9 @@ index 67603b3..ea17712 100644
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
@@ -261,4 +263,27 @@ public class SpigotConfig
|
||||
unknownCommandMessage = transform( getString( "messages.unknown-command", "Unknown command. Type \"/help\" for help." ) );
|
||||
serverFullMessage = transform( getString( "messages.server-full", "The server is full!" ) );
|
||||
@@ -265,4 +267,27 @@ public class SpigotConfig
|
||||
outdatedClientMessage = transform( getString( "messages.outdated-client", "Outdated client!" ) );
|
||||
outdatedServerMessage = transform( getString( "messages.outdated-server", "Outdated server!" ) );
|
||||
}
|
||||
+
|
||||
+ public static List<Pattern> logFilters;
|
||||
|
Loading…
Reference in New Issue
Block a user