mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 03:44:57 +00:00
Make the isSeniorAdmin() check the rank of Discord Command Senders since they're always verified
This commit is contained in:
parent
7830831111
commit
0203f05ad0
1 changed files with 10 additions and 0 deletions
|
@ -9,6 +9,8 @@ import me.StevenLawson.TotalFreedomMod.config.Configuration;
|
|||
import me.StevenLawson.TotalFreedomMod.config.ConfigurationEntry;
|
||||
import me.StevenLawson.TotalFreedomMod.config.MainConfig;
|
||||
import me.StevenLawson.TotalFreedomMod.deprecated.twitter.TwitterHandler;
|
||||
import me.StevenLawson.TotalFreedomMod.discord.sender.DiscordCommandSender;
|
||||
import me.StevenLawson.TotalFreedomMod.player.PlayerRank;
|
||||
import me.StevenLawson.TotalFreedomMod.player.UUIDManager;
|
||||
import me.StevenLawson.TotalFreedomMod.util.Utilities;
|
||||
import me.StevenLawson.TotalFreedomMod.world.AdminWorld;
|
||||
|
@ -481,6 +483,14 @@ public class AdminList
|
|||
|| (MainConfig.getBoolean(ConfigurationEntry.CONSOLE_IS_SENIOR) && sender.getName().equals("CONSOLE"));
|
||||
}
|
||||
|
||||
if(sender instanceof DiscordCommandSender) {
|
||||
PlayerRank rank = PlayerRank.fromSender(sender);
|
||||
|
||||
if(rank.equals(PlayerRank.SENIOR)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
final Admin entry = getEntry((Player) sender);
|
||||
if (entry != null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue