Reputation: 15
I'm making a plugin for my server, but when I start the server, it gives me this error:
[Server thread/ERROR]: Could not load 'plugins\CustomServer.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.2
at org.bukkit.craftbukkit.v1_20_R1.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:317) ~[spigot-1.20-R0.1-SNAPSHOT.jar:3797-Spigot-7e2af8b-091027a]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:141) ~[spigot-api-1.20-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot-api-1.20-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) ~[spigot-api-1.20-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.loadPlugins(CraftServer.java:429) ~[spigot-1.20-R0.1-SNAPSHOT.jar:3797-Spigot-7e2af8b-091027a]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:219) ~[spigot-1.20-R0.1-SNAPSHOT.jar:3797-Spigot-7e2af8b-091027a]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:973) ~[spigot-1.20-R0.1-SNAPSHOT.jar:3797-Spigot-7e2af8b-091027a]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.20-R0.1-SNAPSHOT.jar:3797-Spigot-7e2af8b-091027a]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
plugin.yml:
name: CustomServer
version: '1.0'
main: me.user.customserver.CustomServer
api-version: 1.20
Upvotes: 1
Views: 1395
Reputation: 41
The api-version in the yml file is seen as a number (with 2 decimals). The 0 gets trimmed because the number is round. Thats why the error says you are using api-version 1.2
You should make the api-version a string so it will recognise it as 1.20.
name: CustomServer
version: '1.0'
main: me.user.customserver.CustomServer
api-version: '1.20'
Upvotes: 2