0
\$\begingroup\$

build.gradle

For Compile

repositories {
    mavenCentral()
    maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
}

dependencies {

    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'

    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'

    compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'

}

I am trying to develop plugins for myself and later for servers, maybe for selling. When I compile like a jar file it goes okay but when I insert it in a server it will show an "unsupported API" error message. I tried to fix it by removing the API or just setting it to 1.17.1, but then I will get another error.

Console Error

[09:40:36] [Server thread/ERROR]: Could not load 'plugins\mementosproject-1.0.0.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.17.1-R0.1-SNAPSHOT
        at org.bukkit.craftbukkit.v1_17_R1.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:304) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:141) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:409) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.reload(CraftServer.java:908) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
        at org.bukkit.Bukkit.reload(Bukkit.java:697) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:27) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-1.17.1.jar:3273-Spigot-3892929-376edf4]      

Plugin.yml File

name: FirstProject

version: 1.0.0 

author: _Mentos 

main:  org.spigotmc.me.mentosproject

api-version: 1.17.1-R0.1-SNAPSHOT

database: false
\$\endgroup\$
2
  • \$\begingroup\$ Fixed. Can close this topic. \$\endgroup\$ Commented Nov 6, 2021 at 9:03
  • 3
    \$\begingroup\$ Please post your solution as an answer below, so that others can benefit from this question & your solution later! \$\endgroup\$ Commented Nov 6, 2021 at 9:09

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.