[英]Minecraft Java 1.12.2 Server Spigot Plugin error
I need help with a Minecraft server plugin, my server is giving me an error of Cannot find main class `harvey.plugin.jmsg.JoinMsg'
and heres my Plugin.yml:我需要有关 Minecraft 服务器插件的帮助,我的服务器给了我一个错误, Cannot find main class `harvey.plugin.jmsg.JoinMsg'
,这是我的 Plugin.yml:
main: harvey.plugin.jmsg.JoinMsg
version: 10.1
author: harvey
commands:
and here is my plugin its self这是我的插件它自己
package harvey.plugin.jmsg;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.plugin.java.JavaPlugin;
public class JoinMsg extends JavaPlugin implements Listener{
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
}
@Override
public void onDisable() {
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent e) throws FileNotFoundException {
Player p = e.getPlayer();
String joianquitmsg = null;
File joinquitmsg = new File("/CJAL/msg.txt");
Scanner msginfo = new Scanner(joinquitmsg);
e.setJoinMessage(joianquitmsg);
}
@EventHandler
public void onPlayerQuit(PlayerQuitEvent e) {
Player p = e.getPlayer();
e.setQuitMessage(getName() + "Welcome!");
}
}
is anyone can help me that would be amazing: I'm new to this so any tips aswell would be helpfull!任何人都可以帮助我,这将是惊人的:我是新手,所以任何提示都会有所帮助! :) :)
Your probably exporting it wrong in your IDE您可能在 IDE 中将其导出错误
try exporting the src and plugin.yml ONLY尝试仅导出 src 和 plugin.yml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.