mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 09:19:38 +01:00
de2af506f3
Rewrite console improvements (console colors, tab completion, persistent input line, ...) using JLine 3.x and TerminalConsoleAppender. New features: - Support console colors for Vanilla commands - Add console colors for warnings and errors - Server can now be turned off safely using CTRL + C. JLine catches the signal and the implementation shuts down the server cleanly. - Support console colors and persistent input line when running in IntelliJ IDEA Other changes: - Update JLine to 3.3.1 (from 2.12.1) - Server starts 1-2 seconds faster thanks to optimizations in Log4j configuration
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
From bccb89f85524a48eb9b6f4bb12f3369b7e151fe2 Mon Sep 17 00:00:00 2001
|
|
From: kashike <kashike@vq.lc>
|
|
Date: Fri, 9 Jun 2017 07:24:34 -0700
|
|
Subject: [PATCH] Add configuration option to prevent player names from being
|
|
suggested
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
index 28917f63..f4b23703 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
@@ -265,4 +265,9 @@ public class PaperConfig {
|
|
}
|
|
removeInvalidStatistics = getBoolean("settings.remove-invalid-statistics", false);
|
|
}
|
|
+
|
|
+ public static boolean suggestPlayersWhenNullTabCompletions = true;
|
|
+ private static void suggestPlayersWhenNull() {
|
|
+ suggestPlayersWhenNullTabCompletions = getBoolean("settings.suggest-player-names-when-null-tab-completions", suggestPlayersWhenNullTabCompletions);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index d515ef0f..463f5890 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1873,5 +1873,10 @@ public final class CraftServer implements Server {
|
|
commandMap.registerServerAliases();
|
|
return true;
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
|
+ return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
|
|
+ }
|
|
// Paper end
|
|
}
|
|
--
|
|
2.13.0
|
|
|