我为我的服务器找到了非常好的插件并且它已经死了,作者没有更新它所以我更新了它但是当我把插件放在我的插件文件夹中时它没有用。这是cmd ERROR]:无法加载' plugins \ BossBarMessage.jar'在文件夹'插件' org.bukkit.plugin.InvalidPluginException:找不到主类`com.thenathang.bossbarmessage.Main' 在org.bukkit.plugin.java.PluginClassLoader。(PluginClassLoader.java:66)〜[spigot-1.12.jar:git-Spigot-596221b-9a1fc1e] 这是代码:
package com.thenathang.bossbarmessage;
import com.thenathang.bossbarmessage.Util.StringUtil;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
import me.confuser.barapi.BarAPI;
import net.gravitydevelopment.updater.Updater;
import net.gravitydevelopment.updater.Updater.UpdateResult;
import net.gravitydevelopment.updater.Updater.UpdateType;
import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin implements Listener
{
public static Main instance;
public YamlConfiguration config;
public String currentMessage = "";
public static boolean update = false;
public static String name = "";
答案 0 :(得分:0)
检查plugin.yml主要属性是否指向此类(扩展JavaPlugin)