block worldedit copy variables (#154)

This commit is contained in:
Super_ 2019-11-18 17:29:20 -05:00 committed by Robinson Gallego
parent e884d9b47e
commit 7726cae9a3

View File

@ -8,6 +8,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.admin.AdminList;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
@ -167,6 +168,11 @@ public class CommandBlocker extends FreedomService
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);
if (!matcher.matches())
{