Making a event happen after a certain amount of people are online

Discussion in 'Plugin Development' started by xtreameprogram, Feb 24, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    xtreameprogram

    After 2 people get on a event is supposed to happen but nothing does. There is also no error.
    This is my code:
    Code:
        @EventHandler
        public void onPlayerJoin(PlayerJoinEvent e) {
            if (Bukkit.getServer().getOnlinePlayers().length == 2) {
                setWhiteList(true);
            Bukkit.getServer().broadcastMessage(ChatColor.YELLOW + "60 Seconds until start");
     
  2. Offline

    Niknea

    xtreameprogram Did you register your event? Also add a debug code above the if statement and see if it executes.
     
Thread Status:
Not open for further replies.

Share This Page