mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Order of operations fix
This commit is contained in:
parent
e1c3bad4d0
commit
32138b2e59
@ -92,6 +92,15 @@ public class Command_cage extends FreedomCommand
|
||||
}
|
||||
}
|
||||
|
||||
if (outerMaterial == Material.PLAYER_HEAD)
|
||||
{
|
||||
FUtil.adminAction(sender.getName(), "Caging " + player.getName() + " in " + skullName, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
FUtil.adminAction(sender.getName(), "Caging " + player.getName(), true);
|
||||
}
|
||||
|
||||
Location location = player.getLocation().clone().add(0.0, 1.0, 0.0);
|
||||
|
||||
if (skullName != null)
|
||||
@ -102,18 +111,8 @@ public class Command_cage extends FreedomCommand
|
||||
{
|
||||
fPlayer.getCageData().cage(location, outerMaterial, innerMaterial);
|
||||
}
|
||||
|
||||
player.setGameMode(GameMode.SURVIVAL);
|
||||
|
||||
if (outerMaterial == Material.PLAYER_HEAD)
|
||||
{
|
||||
FUtil.adminAction(sender.getName(), "Caging " + player.getName() + " in " + skullName, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
FUtil.adminAction(sender.getName(), "Caging " + player.getName(), true);
|
||||
}
|
||||
|
||||
plugin.pul.logPunishment(new Punishment(player.getName(), FUtil.getIp(player), sender.getName(), PunishmentType.CAGE, null));
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user