Reverted changes to /cage. What was broken here?

This commit is contained in:
Steven Lawson 2012-12-01 14:26:08 -05:00
parent f6d8222a1a
commit e0c2869da8

View File

@ -40,26 +40,18 @@ public class Command_cage extends TFM_Command
{
if (TFM_Util.isStopCommand(args[1]))
{
TFM_Util.adminAction(sender.getName(), "Uncaging " + p.getName(), true);
TFM_Util.adminAction(sender.getName(), "Uncaging " + p.getName() + ".", true);
playerdata.setCaged(false);
playerdata.regenerateHistory();
playerdata.clearHistory();
sender.sendMessage(ChatColor.GREEN + p.getName() + " uncaged.");
return true;
}
else
{
cage_material_outer = Material.matchMaterial(args[1]);
if (cage_material_outer == null)
{
TFM_Util.adminAction(sender.getName(), "Uncaging " + p.getName(), true);
playerdata.setCaged(false);
playerdata.regenerateHistory();
playerdata.clearHistory();
sender.sendMessage(ChatColor.GREEN + p.getName() + " uncaged.");
return true;
}
else
{
cage_material_outer = Material.GLASS;
}
@ -85,8 +77,11 @@ public class Command_cage extends TFM_Command
TFM_Util.buildHistory(target_pos, 2, playerdata);
TFM_Util.generateCube(target_pos, 2, playerdata.getCageMaterial(TFM_UserInfo.CageLayer.OUTER));
TFM_Util.generateCube(target_pos, 1, playerdata.getCageMaterial(TFM_UserInfo.CageLayer.INNER));
p.setGameMode(GameMode.SURVIVAL);
TFM_Util.adminAction(sender.getName(), "Caging " + p.getName(), true);
TFM_Util.adminAction(sender.getName(), "Caging " + p.getName() + ".", true);
return true;
}
}