Can someone please help

Discussion in 'Spigot Plugin Help' started by wyn_price, May 16, 2016.

  1. OK I'm trying to create my first plugin and I've run into a problem that i cant seem to find the answer for. I know very little Java. I'm trying to get the plugin to open a config.yml and if it cant find it, to create one. I know that some of the imports are not needed, I'm using them later

    Code (Text):
    package me.Pricea1;

    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.entity.Player;
    import org.bukkit.inventory.Inventory;

    public abstract class MainInvGUI {
        File file = new File(getDataFolder(), "config.yml");
        if (!file.exists()) {
            getLogger().info("config.yml not found, creating!");
        } else {
            getLogger().info("config.yml found, loading!");
  2. I think you should watch some tutorials, because it seems like you don't really understand how to code with spigot api.

    Very nice video

    Also use extends JavaPlugin behind class

    Also look at this