mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Reverted changes to /cage. What was broken here?
This commit is contained in:
parent
f6d8222a1a
commit
e0c2869da8
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user