Check null for plugin commands

This commit is contained in:
Frank van der Heijden 2020-06-08 10:28:08 +02:00
parent a388981194
commit 86281dd769
No known key found for this signature in database
GPG key ID: 26DA56488D314D11

View file

@ -99,7 +99,10 @@ public class PluginManager {
return;
}
plugin.getDescription().getCommands().forEach((cmd, data) -> {
Map<String, Map<String, Object>> commands = plugin.getDescription().getCommands();
if (commands == null) return; // Older versions
commands.forEach((cmd, data) -> {
map.remove(cmd);
@SuppressWarnings("unchecked")