mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
revert calebs broken patch
This commit is contained in:
parent
5cdbae0166
commit
de0d6853b7
@ -14,6 +14,7 @@ import org.bukkit.entity.Player;
|
||||
@CommandParameters(description = "Run any command on all users, username placeholder = ?.", usage = "/<command> [fluff] ? [fluff] ?")
|
||||
public class Command_wildcard extends FreedomCommand
|
||||
{
|
||||
|
||||
public static final List<String> BLOCKED_COMMANDS = Arrays.asList(
|
||||
"wildcard",
|
||||
"gtfo",
|
||||
@ -51,15 +52,15 @@ public class Command_wildcard extends FreedomCommand
|
||||
aliases = Arrays.asList(fCmd.getAliases().split(","));
|
||||
}
|
||||
|
||||
for (String arg : args)
|
||||
for (String blockedCommand : BLOCKED_COMMANDS)
|
||||
{
|
||||
String strCommand = StringUtils.strip(arg, "/");
|
||||
if (BLOCKED_COMMANDS.contains(strCommand.toLowerCase()) || aliases.contains(strCommand.toLowerCase()))
|
||||
if (blockedCommand.equals(args[0].toLowerCase()) || aliases.contains(blockedCommand))
|
||||
{
|
||||
msg("Did you really think that was going to work?", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
String baseCommand = StringUtils.join(args, " ");
|
||||
|
||||
if (plugin.cb.isCommandBlocked(baseCommand, sender))
|
||||
@ -74,6 +75,7 @@ public class Command_wildcard extends FreedomCommand
|
||||
msg("Running Command: " + runCommand);
|
||||
server.dispatchCommand(sender, runCommand);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user