fCraft.BuildingCommands.WaterHandler C# (CSharp) Method

WaterHandler() private static method

private static WaterHandler ( Player player, Command cmd ) : void
player Player
cmd Command
return void
        private static void WaterHandler( Player player, Command cmd )
        {
            if ( player.GetBind( Block.Aqua ) == Block.Water ||
                player.GetBind( Block.Cyan ) == Block.Water ||
                player.GetBind( Block.Blue ) == Block.Water ) {
                player.ResetBind( Block.Aqua, Block.Cyan, Block.Blue );
                player.Message( "Water: OFF" );
            } else {
                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." );
            }
        }