Full BungeeCord compatibility.

Fixes #1392.
Fixes SpigotMC/BungeeCord#1211.