https://github.com/Bukkit/CraftBukkit/pull/1167/files#r5987869