2015-09-20 110 views
1

在Eclipse中,我在我的頂部空白行有一個錯誤,我不能擺脫它。這裏是我的代碼(我正在製作一個bukkit插件):Eclipse錯誤com.avaje.ebean.EbeanServer未解決

//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; 
    } 

} 

反正我找不到它。請幫忙。

+0

嘗試刪除空白 – Moudiz

+1

錯誤說的是什麼? –

回答

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