mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
part DONE
This commit is contained in:
parent
9bb316b80b
commit
78f3127dc9
@ -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;
|
||||
}
|
||||
|
@ -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"
|
Loading…
Reference in New Issue
Block a user