https://github.com/Bukkit/Bukkit/pull/935/files#r6678458