Added cancellation support

https://github.com/Bukkit/Bukkit/pull/795