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
1 changed files with 2 additions and 2 deletions

View File

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