fix: incorrect cast target due to class hierarchy change in different Bukkit API version (#3224) (commit: 47245d6)