mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 09:07:37 +00:00
Be more specific with the command blocker
This commit is contained in:
parent
d785ef31c8
commit
53cd4b1306
@ -120,7 +120,7 @@ public class Plex extends PlexPlugin implements PlexApiProvider
|
||||
messages.load();
|
||||
toggles.load();
|
||||
|
||||
// Don't add default entries to indefinite ban file
|
||||
// Don't add default entries to these files
|
||||
indefBans.load(false);
|
||||
commands.load(false);
|
||||
|
||||
|
@ -75,9 +75,8 @@ public class CommandListener extends PlexListener
|
||||
String[] commandArgs = blockedCommand.getCommand().split(" ");
|
||||
if (arguments.toLowerCase(Locale.ROOT).startsWith(StringUtils.join(commandArgs, " ", 1, commandArgs.length).toLowerCase(Locale.ROOT)))
|
||||
{
|
||||
PlexLog.debug("Player attempted to use a blocked command with an alias.");
|
||||
PlexLog.debug("Player attempted to use a blocked command with alias of normal command: " + blockedCommand.getCommand());
|
||||
cmdRef.set(blockedCommand);
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -10,7 +10,7 @@
|
||||
# - The ranks are "e" for everyone, "s" for senior admin, and "a" for admin
|
||||
# - MATCHING MODE: The command is just the command without slashes. Optional arguments are specified as well. It also accepts full plugins via specifying the plugin name followed by a ":" (e.g. "viaversion:")
|
||||
# - REGEX MODE: The command is regex that matches the desired command. It matches case insensitively.
|
||||
# - Finally the block message. MUST NOT CONTAIN ":". Use _ to use the default command blocked message as specified in messages.yml, or you can optionally put your own in
|
||||
# - Finally the block message MUST NOT CONTAIN ":". Use _ to use the default command blocked message as specified in messages.yml, or you can optionally put your own in
|
||||
#
|
||||
# So these would be valid:
|
||||
# - "m:e:mail sendall:You cannot send messages to everyone on the server"
|
||||
|
Loading…
Reference in New Issue
Block a user