mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Fix players being marked as an impostor when the Discord verification system is disabled
This commit is contained in:
parent
11984bc46f
commit
9a7cc52e03
@ -33,7 +33,7 @@ public class Command_manuallyverify extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.pl.isImposter(player))
|
||||
if (!plugin.pl.IsImpostor(player))
|
||||
{
|
||||
msg("That player is not an impostor.");
|
||||
return true;
|
||||
|
@ -29,7 +29,7 @@ public class Command_verify extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.pl.isImposter(playerSender))
|
||||
if (!plugin.pl.IsImpostor(playerSender))
|
||||
{
|
||||
msg("You are not an impostor, therefore you do not need to verify.", ChatColor.RED);
|
||||
return true;
|
||||
@ -57,7 +57,7 @@ public class Command_verify extends FreedomCommand
|
||||
String code = args[0];
|
||||
String backupCode = null;
|
||||
|
||||
if (plugin.pl.isImposter(playerSender))
|
||||
if (plugin.pl.IsImpostor(playerSender))
|
||||
{
|
||||
PlayerData mapPlayer = plugin.dc.getVerificationCodes().get(code);
|
||||
if (mapPlayer == null)
|
||||
|
@ -156,12 +156,13 @@ public class PlayerList extends FreedomService
|
||||
public Boolean isPlayerImpostor(Player player)
|
||||
{
|
||||
PlayerData playerData = getData(player);
|
||||
return !plugin.sl.isStaff(player)
|
||||
return plugin.dc.enabled
|
||||
&& !plugin.sl.isStaff(player)
|
||||
&& (playerData.hasVerification())
|
||||
&& !playerData.getIps().contains(FUtil.getIp(player));
|
||||
}
|
||||
|
||||
public boolean isImposter(Player player)
|
||||
public boolean IsImpostor(Player player)
|
||||
{
|
||||
return isPlayerImpostor(player) || plugin.sl.isStaffImpostor(player);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user