Merge branch 'Wilee999-patch-3'

This commit is contained in:
unknown 2014-06-22 17:12:56 +02:00
commit 57dda8367c
3 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit! #Build Number for ANT. Do not edit!
#Sun Jun 22 16:53:34 CEST 2014 #Sun Jun 22 17:11:19 CEST 2014
build.number=864 build.number=865

View File

@ -3,6 +3,7 @@ package me.StevenLawson.TotalFreedomMod.Commands;
import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry; import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry;
import me.StevenLawson.TotalFreedomMod.TFM_Admin; import me.StevenLawson.TotalFreedomMod.TFM_Admin;
import me.StevenLawson.TotalFreedomMod.TFM_AdminList; import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
import me.StevenLawson.TotalFreedomMod.TFM_PlayerData;
import me.StevenLawson.TotalFreedomMod.TFM_TwitterHandler; import me.StevenLawson.TotalFreedomMod.TFM_TwitterHandler;
import me.StevenLawson.TotalFreedomMod.TFM_Util; import me.StevenLawson.TotalFreedomMod.TFM_Util;
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
@ -167,6 +168,17 @@ public class Command_saconfig extends TFM_Command
TFM_Util.adminAction(sender.getName(), "Adding " + player.getName() + " to the superadmin list", true); TFM_Util.adminAction(sender.getName(), "Adding " + player.getName() + " to the superadmin list", true);
TFM_AdminList.addSuperadmin(player); TFM_AdminList.addSuperadmin(player);
if (player.isOnline())
{
final TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData((Player) player);
if (playerdata.isFrozen())
{
playerdata.setFrozen(false);
TFM_Util.playerMsg((Player) player, "You have been unfrozen.");
}
}
return true; return true;
} }

View File

@ -736,11 +736,12 @@ public class TFM_PlayerListener implements Listener
// Handle admin impostors // Handle admin impostors
if (TFM_AdminList.isAdminImpostor(player)) if (TFM_AdminList.isAdminImpostor(player))
{ {
TFM_Util.bcastMsg("Warning: " + player.getName() + " has been flagged as an impostor!", ChatColor.RED); TFM_Util.bcastMsg("Warning: " + player.getName() + " has been flagged as an impostor and has been frozen!", ChatColor.RED);
TFM_Util.bcastMsg(ChatColor.AQUA + player.getName() + " is " + TFM_PlayerRank.getLoginMessage(player)); TFM_Util.bcastMsg(ChatColor.AQUA + player.getName() + " is " + TFM_PlayerRank.getLoginMessage(player));
player.getInventory().clear(); player.getInventory().clear();
player.setOp(false); player.setOp(false);
player.setGameMode(GameMode.SURVIVAL); player.setGameMode(GameMode.SURVIVAL);
TFM_PlayerData.getPlayerData(player).setFrozen(true);
} }
else if (TFM_AdminList.isSuperAdmin(player) || TFM_Util.DEVELOPERS.contains(player.getName())) else if (TFM_AdminList.isSuperAdmin(player) || TFM_Util.DEVELOPERS.contains(player.getName()))
{ {