While I realize that PlayerBanEvents aren't real, I would like to know how to program the equivalent of one. How can I tell when a player is banned or unbanned?
That works for the ban command, but I also want to catch when a plugin calls the Player::setBanned() method. No, he had it right. You can check if a player is banned by calling the Player::isBanned() method.