PlayerQuitEvent Event not working

Apr 15, 2020
PlayerQuitEvent Event not working
  • Code (Java):
    @EventHandler
        public void onPlayerQuit(PlayerQuitEvent e ) {
            if (Bukkit.getServer().getOnlinePlayers().size() == 0) {
                Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "stop");
            }
        }
    Why doesn't it work? There is no error
    lg
  • Loading...
  • Loading...