GeorgH93 / MarriageMaster

Marriage Plugin for Bukkit/Spigot
https://www.spigotmc.org/resources/marriage-master.19273/
GNU General Public License v3.0
113 stars 90 forks source link

Can not use the API #275

Closed Fer-Jg closed 1 year ago

Fer-Jg commented 1 year ago

Help request

Problem

Issue when trying to use the API for plugin development but I get a linter warning saying The type at.pcgamingfreaks.Message.IMessage cannot be resolved. It is indirectly referenced from required .class files.

What I have tried

Tried to use the API by including the jar in my build path dependencies, also tried to build my plugin with gradle and in both situations it gives the exact same issue, other dependencies can be used properly so I can only think that it is a MarriageMaster issue

GeorgH93 commented 1 year ago

You will also need the IMessage dependency. If you use Maven or Gradle to keep track of your dependencies this should be downloaded automatically.

It's been some time since I have used Gradle, but I think this should work: Add the PCGF repo:

repositories {
    mavenCentral()
    maven {
        url "https://repo.pcgamingfreaks.at/repository/maven-everything"
    }
}

And then you can add the API like this:

dependencies {
    compileOnly 'at.pcgamingfreaks:MarriageMaster-API-Bukkit:2.6.7'
}

and then gradle should automatically download the IMessage dependency.

Fer-Jg commented 1 year ago

Yeah, I am pretty sure I already have my gradle setup properly configured (I double checked and it is set just as you advised), it's just the IMessage thing, I don't know why it's not being downloaded :(

GeorgH93 commented 1 year ago

Maybe add the IMessage dependency manually.

compileOnly 'at.pcgamingfreaks:IMessage:1.0.37-SNAPSHOT'
Fer-Jg commented 1 year ago

Yeah, adding the IMessage dependency manually worked, thanks! :)