mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-12 13:53:54 +00:00
Fixed false positive plugin specific command block. Resolves #575
This commit is contained in:
@ -712,7 +712,7 @@ public class TFM_PlayerListener implements Listener
|
||||
command = command.toLowerCase().trim();
|
||||
|
||||
// Blocked commands
|
||||
if (TFM_CommandBlocker.isCommandBlocked(command, event.getPlayer()))
|
||||
if (TFM_CommandBlocker.isCommandBlocked(command, event.getPlayer(), true))
|
||||
{
|
||||
// CommandBlocker handles messages and broadcasts
|
||||
event.setCancelled(true);
|
||||
|
@ -102,7 +102,7 @@ public class TFM_CommandBlocker
|
||||
|
||||
public static boolean isCommandBlocked(String command, CommandSender sender)
|
||||
{
|
||||
return isCommandBlocked(command, sender, true);
|
||||
return isCommandBlocked(command, sender, false);
|
||||
}
|
||||
|
||||
public static boolean isCommandBlocked(String command, CommandSender sender, boolean doAction)
|
||||
@ -112,7 +112,7 @@ public class TFM_CommandBlocker
|
||||
return false;
|
||||
}
|
||||
|
||||
if (command.contains(":"))
|
||||
if (command.split(" ")[0].contains(":"))
|
||||
{
|
||||
TFM_Util.playerMsg(sender, "Plugin-specific commands are disabled.");
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user