me when i dont finish my own code

This commit is contained in:
9378062 2022-04-08 10:23:08 -04:00
parent 5f7a89d7cd
commit 13a458859c

View File

@ -80,8 +80,8 @@ public class CommandBlockerManager
int ind = regexOrMatch.indexOf(' '); int ind = regexOrMatch.indexOf(' ');
if (ind == -1 && regexOrMatch.endsWith(":")) if (ind == -1 && regexOrMatch.endsWith(":"))
{ {
//block all commands from this plugin for the specified rank String pluginName = regexOrMatch.substring(0, regexOrMatch.length() - 1);
Plugin plugin = Arrays.stream(Plex.get().getServer().getPluginManager().getPlugins()).findAny().orElse(null); Plugin plugin = Arrays.stream(Plex.get().getServer().getPluginManager().getPlugins()).filter(pl -> pl.getName().equalsIgnoreCase(pluginName)).findAny().orElse(null);
if (plugin != null) if (plugin != null)
{ {
List<Command> commandList = PluginCommandYamlParser.parse(plugin); List<Command> commandList = PluginCommandYamlParser.parse(plugin);