如何制作同时也是discord机器人的Minecraft插口插件?服务器认为类是org。javacord。应用程序编程接口。DiscordApiBuilder不存在,因此无法加载插件。我使用Maven(eclipse)
它表示没有定义DiscordApiBuilder类,如何导入该jar?
是否有可能或我必须更改不和谐api?错误:
Could not load 'plugins\StoneBot.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: org/javacord/api/DiscordApiBuilder
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:291) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.reload(CraftServer.java:744) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.Bukkit.reload(Bukkit.java:534) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:646) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchServerCommand(CraftServer.java:632) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.DedicatedServer.aM(DedicatedServer.java:353) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:317) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:634) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:537) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_301]
Caused by: java.lang.NoClassDefFoundError: org/javacord/api/DiscordApiBuilder
at adwidu.mainPackage.Main.<init>(Main.java:15) ~[?:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_301]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_301]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_301]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_301]
at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_301]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
... 14 more
Caused by: java.lang.ClassNotFoundException: org.javacord.api.DiscordApiBuilder
at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_301]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_301]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_301]
at adwidu.mainPackage.Main.<init>(Main.java:15) ~[?:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_301]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_301]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_301]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_301]
at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_301]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
... 14 more
您导入的jar未加载到您的minecraft服务器上。
要使用您的依赖关系,例如它不是一个可以由spiget运行的插件,您必须将其包含在构建的jar中。
要做到这一点,您必须将其添加到pom中。xml:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
警告:这将在您的jar中添加所有依赖项。
要不包含诸如spigot之类的插件,您必须添加
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
遵循YouTube教程,但当我运行插件时,Minecraft根本没有注册它。该插件旨在返回“嗨!”当这出戏开始/你好或/你好时。当我把插件放在我的服务器上时,什么都没有,甚至没有在/plugins中注册 代码: Main.java: 你好,司令部。爪哇: plugin.yml: YT教程:https://www.youtube.com/watch?v=XaU8JKQW0Ao 任何帮助都将不胜感激。
前几天我开始开发一个bukkit插件,目的是在用户输入“/hello”时在文本窗口中返回hello。但是,这不起作用,因为我无法在eclipse中导入命令行。有什么建议吗?它说,“命令不能解析为类型”
问题内容: 我正在尝试根据elasticsearch教程导入shakespeare.json。 [环境] 弹性搜寻2.1 Sense -Extension for Chrome [背景] 当我粘贴 在Sense选项卡上时(扩展程序会打开一个带有2个窗口的新选项卡),它将转换为并且输出为 [我的发现] 我已经在本地下载了shakespeare.json,但是我认为Sense无法找到文件所在的路径(可
我已经为我的圣杯项目安装了石英插件,并创建了Job。 BuildConfig.groovy 现在我想用下面的插件来监控我创建的作业。 https://grails.org/plugin/quartz-monitor 要安装此插件,它说 在BuildConfig.groovy中添加依赖项: 我补充道 但它给出的错误为: 在深入挖掘之后,我了解了grails的插件库 http://repo . gra
我尝试了这些主题,但没有成功: 找不到Grails独立插件 使用Grails创建独立应用程序 谢谢
我无法在任何vue组件中导入引导(使用最新的nuxtjs)。我得到: 我的(简单)组件是: 我真的被卡住了。你有什么想法或建议吗?