Allow server ops to use commands
This commit is contained in:
		@@ -56,8 +56,8 @@ public class LibsDisguises extends JavaPlugin {
 | 
			
		||||
        LibsPremium.check(getDescription().getVersion(), getFile());
 | 
			
		||||
 | 
			
		||||
        if (!LibsPremium.isPremium()) {
 | 
			
		||||
            getLogger().info("You are running the free version, commands limited to non-players (Console, Command " +
 | 
			
		||||
                    "Blocks)");
 | 
			
		||||
            getLogger().info("You are running the free version, commands limited to non-players and operators. (Console, Command " +
 | 
			
		||||
                    "Blocks, Admins)");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!ReflectionManager.getMinecraftVersion().startsWith("1.14.4")) {
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ public abstract class DisguiseBaseCommand implements CommandExecutor {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected boolean isNotPremium(CommandSender sender) {
 | 
			
		||||
        if (sender instanceof Player &&
 | 
			
		||||
        if (sender instanceof Player && !sender.isOp() &&
 | 
			
		||||
                (!LibsPremium.isPremium() || LibsPremium.getPaidInformation() == LibsPremium.getPluginInformation())) {
 | 
			
		||||
            sender.sendMessage(ChatColor.RED + "Please purchase Lib's Disguises to enable player commands");
 | 
			
		||||
            return true;
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ public class UndisguiseCommand implements CommandExecutor {
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
 | 
			
		||||
        if (sender instanceof Player &&
 | 
			
		||||
        if (sender instanceof Player && !sender.isOp() &&
 | 
			
		||||
                (!LibsPremium.isPremium() || LibsPremium.getPaidInformation() == LibsPremium.getPluginInformation())) {
 | 
			
		||||
            sender.sendMessage(ChatColor.RED + "Please purchase Lib's Disguises to enable player commands");
 | 
			
		||||
            return true;
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ public class UndisguiseEntityCommand implements CommandExecutor {
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
 | 
			
		||||
        if (sender instanceof Player &&
 | 
			
		||||
        if (sender instanceof Player && !sender.isOp()&&
 | 
			
		||||
                (!LibsPremium.isPremium() || LibsPremium.getPaidInformation() == LibsPremium.getPluginInformation())) {
 | 
			
		||||
            sender.sendMessage(ChatColor.RED + "Please purchase Lib's Disguises to enable player commands");
 | 
			
		||||
            return true;
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@ public class UndisguisePlayerCommand implements CommandExecutor, TabCompleter {
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
 | 
			
		||||
        if (sender instanceof Player &&
 | 
			
		||||
        if (sender instanceof Player && !sender.isOp() &&
 | 
			
		||||
                (!LibsPremium.isPremium() || LibsPremium.getPaidInformation() == LibsPremium.getPluginInformation())) {
 | 
			
		||||
            sender.sendMessage(ChatColor.RED + "Please purchase Lib's Disguises to enable player commands");
 | 
			
		||||
            return true;
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@ public class UndisguiseRadiusCommand implements CommandExecutor {
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
 | 
			
		||||
        if (sender instanceof Player &&
 | 
			
		||||
        if (sender instanceof Player && !sender.isOp() &&
 | 
			
		||||
                (!LibsPremium.isPremium() || LibsPremium.getPaidInformation() == LibsPremium.getPluginInformation())) {
 | 
			
		||||
            sender.sendMessage(ChatColor.RED + "Please purchase Lib's Disguises to enable player commands");
 | 
			
		||||
            return true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user