貌似在源码的target文件夹里已经构建好了一个.
如果你要自己重新构建:
①.下载源码
②.解压源码,并将源码目录拖入IDEA.
③.等待IDEA自动补全依赖,然后启用构建.(最后一步是回车确定使用构建命令)
如果你要自己重新构建:
①.下载源码

②.解压源码,并将源码目录拖入IDEA.

③.等待IDEA自动补全依赖,然后启用构建.(最后一步是回车确定使用构建命令)

试试Github自动化部署 我已经写好了 并构建好了 详见 https://github.com/ObcbO/Legenda ... ons/runs/5735095148
ObcbO 发表于 2023-8-2 13:28
试试Github自动化构建
我已经写好了 并构建好了 可以直接前往这个链接下载 详见 https://github.com/ObcbO/ ...
构出来的插件会报错
- [13:47:32] [Server thread/ERROR]: Could not load 'plugins\LegendaryDailyShop-1.0-SNAPSHOT.jar' in folder 'plugins'
- org.bukkit.plugin.InvalidPluginException: Cannot find main class `com.gyzer.legendary.dailyshop.LegendaryDailyShop'
- at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:94) ~[forge:?]
- at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[forge:?]
- at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:397) ~[forge:?]
- at catserver.server.command.internal.CommandPlugin.loadPlugin(CommandPlugin.java:133) ~[forge:?]
- at catserver.server.command.internal.CommandPlugin.execute(CommandPlugin.java:47) ~[forge:?]
- at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:156) ~[forge:?]
- at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:680) ~[forge:1.16.5-e1803334]
- at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchServerCommand(CraftServer.java:666) ~[forge:1.16.5-e1803334]
- at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:365) ~[?:?]
- at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:337) ~[?:?]
- at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:943) ~[?:?]
- at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:775) ~[?:?]
- at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:265) ~[?:?]
- at java.lang.Thread.run(Thread.java:834) [?:?]
- Caused by: java.lang.ClassNotFoundException: Failed to remap class com.gyzer.legendary.dailyshop.LegendaryDailyShop
- at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:261) ~[forge:?]
- at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:163) ~[forge:?]
- at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:124) ~[forge:?]
- at java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[?:?]
- at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
- at java.lang.Class.forName0(Native Method) ~[?:?]
- at java.lang.Class.forName(Class.java:398) ~[?:?]
- at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:92) ~[forge:?]
- ... 13 more
- Caused by: java.lang.UnsupportedClassVersionError: com/gyzer/legendary/dailyshop/LegendaryDailyShop has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
- at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
- at java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[?:?]
- at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[?:?]
- at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:253) ~[forge:?]
- at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:163) ~[forge:?]
- at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:124) ~[forge:?]
- at java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[?:?]
- at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
- at java.lang.Class.forName0(Native Method) ~[?:?]
- at java.lang.Class.forName(Class.java:398) ~[?:?]
- at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:92) ~[forge:?]
- ... 13 more
Tirol#5418 发表于 2023-8-2 13:48
构出来的插件会报错////我懂了,用的java17构建的。但是我服务端是java11,有没有其他办法
修改自动构建文件中的java版本