From 4dc63fb7562342da56fca890be5ac9180aa868d1 Mon Sep 17 00:00:00 2001 From: Super_ Date: Sat, 9 Feb 2019 12:30:02 -0500 Subject: [PATCH] don't allow adding player impostors to admin list (#132) --- .../totalfreedommod/command/Command_saconfig.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_saconfig.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_saconfig.java index 0eaa8b4b..fcc9bdcd 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_saconfig.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_saconfig.java @@ -181,11 +181,17 @@ public class Command_saconfig extends FreedomCommand } } + if (plugin.pv.isPlayerImpostor(player)) + { + msg("This player was labeled as a Player impostor and is not an admin, therefore they cannot be added to the admin list.", ChatColor.RED); + return true; + } + if (admin == null) // New admin { if (plugin.mbl.isMasterBuilderImpostor(player)) { - msg("This player was labeled as a Master Builder impostor and is not an admin, therefore they can not be added to the admin list.", ChatColor.RED); + msg("This player was labeled as a Master Builder impostor and is not an admin, therefore they cannot be added to the admin list.", ChatColor.RED); return true; } if (player == null)