diff --git a/CommandWhitelistBukkit/pom.xml b/CommandWhitelistBukkit/pom.xml
index 8739888..38a59a0 100644
--- a/CommandWhitelistBukkit/pom.xml
+++ b/CommandWhitelistBukkit/pom.xml
@@ -6,7 +6,7 @@
eu.endermite.commandwhitelist
CommandWhitelist
- 2.2.5
+ 2.2.6
Bukkit
@@ -34,7 +34,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.3.0-SNAPSHOT
+ 3.2.4
package
@@ -92,7 +92,7 @@
net.kyori
adventure-platform-bukkit
- 4.0.0-SNAPSHOT
+ 4.0.1
compile
@@ -110,7 +110,7 @@
org.bstats
bstats-bukkit
- 2.2.1
+ 3.0.0
compile
diff --git a/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/command/MainCommandExecutor.java b/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/command/MainCommandExecutor.java
index 36e5ad9..b02ae4e 100644
--- a/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/command/MainCommandExecutor.java
+++ b/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/command/MainCommandExecutor.java
@@ -9,8 +9,10 @@ import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabExecutor;
+import org.bukkit.help.HelpTopic;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
public class MainCommandExecutor implements TabExecutor {
@@ -72,7 +74,18 @@ public class MainCommandExecutor implements TabExecutor {
@Override
public List onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
- List serverCommands = new ArrayList<>(Bukkit.getCommandMap().getKnownCommands().keySet());
+ List serverCommands;
+ try {
+ serverCommands = new ArrayList<>(Bukkit.getCommandMap().getKnownCommands().keySet());
+ } catch (NoSuchMethodError error) {
+ HashSet commands = new HashSet<>();
+ for (HelpTopic topic : Bukkit.getHelpMap().getHelpTopics()) {
+ String cmd = topic.getName();
+ if (Character.isUpperCase(cmd.charAt(0))) continue;
+ commands.add(topic.getName());
+ }
+ serverCommands = new ArrayList<>(commands);
+ }
return CWCommand.commandSuggestions(CommandWhitelistBukkit.getConfigCache(), serverCommands, args, sender.hasPermission(CWPermission.RELOAD.permission()), sender.hasPermission(CWPermission.ADMIN.permission()), CWCommand.ImplementationType.BUKKIT);
}
}
diff --git a/CommandWhitelistCommon/pom.xml b/CommandWhitelistCommon/pom.xml
index 3d9afec..d22c016 100644
--- a/CommandWhitelistCommon/pom.xml
+++ b/CommandWhitelistCommon/pom.xml
@@ -6,7 +6,7 @@
eu.endermite.commandwhitelist
CommandWhitelist
- 2.2.5
+ 2.2.6
Common
diff --git a/CommandWhitelistVelocity/pom.xml b/CommandWhitelistVelocity/pom.xml
index 7dd80b8..d0300e4 100644
--- a/CommandWhitelistVelocity/pom.xml
+++ b/CommandWhitelistVelocity/pom.xml
@@ -6,7 +6,7 @@
eu.endermite.commandwhitelist
CommandWhitelist
- 2.2.5
+ 2.2.6
Velocity
diff --git a/CommandWhitelistWaterfall/pom.xml b/CommandWhitelistWaterfall/pom.xml
index a57fc8b..d3cd212 100644
--- a/CommandWhitelistWaterfall/pom.xml
+++ b/CommandWhitelistWaterfall/pom.xml
@@ -6,7 +6,7 @@
eu.endermite.commandwhitelist
CommandWhitelist
- 2.2.5
+ 2.2.6
Waterfall
@@ -94,13 +94,13 @@
net.kyori
adventure-platform-bungeecord
- 4.0.0-SNAPSHOT
+ 4.0.1
compile
org.bstats
bstats-bungeecord
- 2.2.1
+ 3.0.0
compile
diff --git a/pom.xml b/pom.xml
index 5829372..2c9d037 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
eu.endermite.commandwhitelist
CommandWhitelist
- 2.2.5
+ 2.2.6
CommandWhitelistCommon
CommandWhitelistBukkit