Java Error when making a plugin (playerData undefined)

Discussion in 'Programming' started by pattyd14, May 28, 2015.

  1. I just started setting up my spigot eclipse workspace today, and I get the following error. I was hoping that somebody could help me out, as I believe I imported all of the necessary information.

    Code (Text):
    package tk.blockadenetwork.quickreport;

    import org.bukkit.entity.Player;
    import org.spigotmc.event.player.*;
    import org.bukkit.plugin.java.JavaPlugin;
    import org.bukkit.*;
    import org.spigotmc.*;

    public final class quickreport extends JavaPlugin{
        @Override
        public void onEnable() {
            for (Player player : Bukkit.getServer().getOnlinePlayers()) {
                playerList.put(player.getName(), playerData(player));
            }
            getLogger().info("[QuickReport] Reporting system is now active!");
        }
        @Override
        public void onDisable() {
            getLogger().info("[QuickReport] Reporting system disabled");
        }
    }
    I get the error:

    Code (Text):
    The method playerData(Player) is undefined
    I know that this is a very, very basic problem, but I am unable to find a solution. What am I missing here? Thanks :)
     
  2. My bad... posted this in the wrong place.
     
  3. Create method playerData(Player).
     
  4. The method playerData(Player) does not exist. What exactly is this code supposed to do?

    Also, I *highly* recommend using an IDE for at least starting out so that you don't get stuck on basic things!

    Cheers! :)