part DONE

This commit is contained in:
ayunami2000 2022-04-08 02:49:59 -04:00
parent 9bb316b80b
commit 78f3127dc9
2 changed files with 4 additions and 4 deletions

View File

@ -15,6 +15,8 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import java.util.regex.Matcher;
public class CommandListener extends PlexListener
{
@EventHandler(priority = EventPriority.HIGHEST)
@ -45,10 +47,7 @@ public class CommandListener extends PlexListener
boolean isBlocked = false;
if (blockedCommand instanceof RegexCommand regexCommand)
{
System.out.println(regexCommand.getRegex());
System.out.println(message);
System.out.println(regexCommand.getRegex().matcher(message).results());
if (regexCommand.getRegex().matcher(message).matches())
if (regexCommand.getRegex().matcher(message).lookingAt())
{
isBlocked = true;
}

View File

@ -17,4 +17,5 @@
# - "r:e:(.*:):Plugin specific commands are disabled"
blockedCommands:
- "m:e:mail sendall:You cannot send messages to everyone on the server"
- "m:e:mail sendtempall:You cannot send messages to everyone on the server"
- "r:e:^[^ ]+::Plugin specific commands are disabled"