static void WaterHandler([NotNull] Player player, [NotNull] CommandReader cmd)
{
bool turnWaterOn = (player.GetBind(Block.Aqua) != Block.Water ||
player.GetBind(Block.Cyan) != Block.Water ||
player.GetBind(Block.Blue) != Block.Water);
if (cmd.HasNext && !cmd.NextOnOff(out turnWaterOn))
{
CdWater.PrintUsage(player);
return;
}
if (turnWaterOn)
{
player.Bind(Block.Aqua, Block.Water);
player.Bind(Block.Cyan, Block.Water);
player.Bind(Block.Blue, Block.Water);
player.Message("Water: ON. Blue blocks are replaced with water.");
}
else
{
player.ResetBind(Block.Aqua, Block.Cyan, Block.Blue);
player.Message("Water: OFF");
}
}