Eclipse错误com.avaje.ebean.EbeanServer未解析

时间:2015-09-20 07:16:28

标签: eclipse

在Eclipse中,我的顶部空白行有错误,我无法摆脱它。这是我的代码(我正在制作一个bukkit插件):

//this is where I get the error
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

    @Override
    public void onEnable() {
        new EventHandler(this);
    }

    @Override
    public void onDisable() {

    }

    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {

        if (cmd.getName().equalsIgnoreCase("BLANK") && sender instanceof Player) {

            Player player = (Player) sender;

            return true;

        }

        return false;
    }

}

我无论如何都找不到它。请帮忙。

1 个答案:

答案 0 :(得分:0)

您似乎缺少包裹名称。试试这个:

package my.package.name;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin {

    @Override
    public void onEnable() {
        new EventHandler(this);
    }

    @Override
    public void onDisable() {

    }

    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {

        if (cmd.getName().equalsIgnoreCase("BLANK") && sender instanceof Player) {

            Player player = (Player) sender;

            return true;

        }

        return false;
    }

}

请务必将my.package.name替换为您的包裹名称。