Merge pull request #13 from AtlasMediaGroup/Elmon11-patch-1

Make gcmd not work on admins

//MERGE COMMIT:
At least one build check passed, the failing check is irrelevant.
This commit is contained in:
Paldiu 2020-12-28 07:41:58 -05:00 committed by GitHub
commit c0ac0365eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.command.Command;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -32,6 +33,12 @@ public class Command_gcmd extends FreedomCommand
{
return true;
}
if (plugin.al.isAdmin(player))
{
msg(ChatColor.RED + "You can not use gcmd on admins");
return true;
}
try
{
@ -52,4 +59,4 @@ public class Command_gcmd extends FreedomCommand
return true;
}
}
}