Solved for (Player p : )? How?!

Discussion in 'Spigot Plugin Help' started by MienkaMC, Jun 26, 2016.

  1. I want to make a plugin whit for (Player p : ) but it dosnt work!

    Code:
    public void onEnable()
    {
    Bukkit.getPluginManager().registerEvents(this, this);
    getConfig().options().copyDefaults(true);
    saveConfig();

    Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable()
    {
    public void run()
    {
    for (Player p : )
    {
     
    #1 MienkaMC, Jun 26, 2016
    Last edited: Jun 26, 2016
    • Funny Funny x 2
  2. Learn Java and use the JavaDocs.

    And learn to post in the correct section.

    (hint: Bukkit.getOnlinePlayers())
     
    • Agree Agree x 2
  3. for (Player p : Bukkit.getOnlinePlayers()) {
    }