Marriage Master

Marriage Master

4M Downloads

Can not use the API

Fer-Jg opened this issue ยท 4 comments

commented

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

commented

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 :(

commented

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.

commented

Maybe add the IMessage dependency manually.

compileOnly 'at.pcgamingfreaks:IMessage:1.0.37-SNAPSHOT'
commented

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