mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-12 13:53:54 +00:00
Fix commandblocker not blocking properly. Resolves #586
This commit is contained in:
@ -709,8 +709,6 @@ public class TFM_PlayerListener implements Listener
|
||||
TFM_Log.info(String.format("[PREPROCESS_COMMAND] %s(%s): %s", player.getName(), ChatColor.stripColor(player.getDisplayName()), command), true);
|
||||
}
|
||||
|
||||
command = command.toLowerCase().trim();
|
||||
|
||||
// Blocked commands
|
||||
if (TFM_CommandBlocker.isCommandBlocked(command, event.getPlayer(), true))
|
||||
{
|
||||
|
@ -112,17 +112,22 @@ public class TFM_CommandBlocker
|
||||
return false;
|
||||
}
|
||||
|
||||
command = command.toLowerCase().trim();
|
||||
|
||||
if (command.split(" ")[0].contains(":"))
|
||||
{
|
||||
TFM_Util.playerMsg(sender, "Plugin-specific commands are disabled.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (command.startsWith("/")) {
|
||||
command = command.substring(1);
|
||||
}
|
||||
|
||||
final String[] commandParts = command.split(" ");
|
||||
String subCommand = null;
|
||||
if (commandParts.length > 1)
|
||||
{
|
||||
command = commandParts[0].substring(1);
|
||||
subCommand = StringUtils.join(commandParts, " ", 1, commandParts.length).toLowerCase();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user