39 lines
1.9 KiB
Diff
39 lines
1.9 KiB
Diff
From bcfd15f836f3331070c285e6f4a8221cf6a69760 Mon Sep 17 00:00:00 2001
|
|
From: DemonWav <demonwav@gmail.com>
|
|
Date: Sun, 31 Jan 2016 01:21:03 -0600
|
|
Subject: [PATCH] Make block location tab completion be a per-world
|
|
configurable value
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index e130052..642880e 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1639,7 +1639,7 @@ public final class CraftServer implements Server {
|
|
try {
|
|
// send location info if present
|
|
// completions = getCommandMap().tabComplete(player, message.substring(1));
|
|
- if (blockPosition == null) {
|
|
+ if (blockPosition == null || !((CraftWorld) player.getWorld()).getHandle().paperSpigotConfig.allowBlockLocationTabCompletion) {
|
|
completions = getCommandMap().tabComplete(player, message.substring(1));
|
|
} else {
|
|
completions = getCommandMap().tabComplete(player, message.substring(1), new Location(player.getWorld(), blockPosition.getX(), blockPosition.getY(), blockPosition.getZ()));
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
index ecb9519..008b79c 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
@@ -396,4 +396,10 @@ public class PaperSpigotWorldConfig
|
|
{
|
|
allChunksAreSlimeChunks = getBoolean( "all-chunks-are-slime-chunks", false );
|
|
}
|
|
+
|
|
+ public boolean allowBlockLocationTabCompletion;
|
|
+ private void allowBlockLocationTabCompletion()
|
|
+ {
|
|
+ allowBlockLocationTabCompletion = getBoolean( "allow-block-location-tab-completion", true );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.1
|
|
|