mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
block worldedit copy variables (#154)
This commit is contained in:
parent
e884d9b47e
commit
7726cae9a3
@ -8,6 +8,7 @@ import java.util.regex.Matcher;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||||
|
import me.totalfreedom.totalfreedommod.admin.AdminList;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||||
@ -167,6 +168,11 @@ public class CommandBlocker extends FreedomService
|
|||||||
|
|
||||||
for (String part : commandParts)
|
for (String part : commandParts)
|
||||||
{
|
{
|
||||||
|
if (command.startsWith("/") && !plugin.al.isAdmin(sender) && (part.contains("#copy") || part.contains("#clipboard")))
|
||||||
|
{
|
||||||
|
FUtil.playerMsg(sender, "WorldEdit copy variables are disabled.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Matcher matcher = flagPattern.matcher(part);
|
Matcher matcher = flagPattern.matcher(part);
|
||||||
if (!matcher.matches())
|
if (!matcher.matches())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user