Avoid deprecated API in docs. Make server plugin examples work.
Merge pull request #1845 from nawroth/avoid-deprecated

Avoid deprecated API in docs. Make server plugin examples work with 2.0.