Fixed code to properly use latest Bukkit API