Jump to content

[1.8.9] Using Optional Dependency


Andavin

Recommended Posts

Hey I posted this before for 1.7.10 and was notified that 1.7.x is no longer supported on these forums and to come back when I updated. So I updated my mod to 1.8.9 and I'm unfortunately still getting the exact same error. I'm trying to use WorldEdit as an optional dependency, but I'm having some ClassNotFound exceptions.

 

I have WorldEdit declared as an optional dependency in my main class

dependencies = "required-after:Forge@[11.15.1.1722,);after:WorldEdit"

And also have it as a compile dependency in my build.gradle

compile files('lib/worldedit.jar')

It compiles fine with no errors, but then when I run it (with WorldEdit in the mods folder) it gives me a ClassNotFoundException.

 

Here's the error: (only my mod and WorldEdit in the mods folder)

http://pastebin.com/a7vYXinm

 

I'm using one import for the ForgeWorldEdit main class in my main mod class and there's one other class that simply implements the WorldEdit permissions interface. And all that does is define the methods. If you'd like to see that I can post it.

 

What am I doing wrong here? I can't figure it out. Thank you for any help!

Link to comment
Share on other sites

Although, I just tested and the error comes back when I remove WorldEdit from the mods folder. I want it to be an optional dependency is there a way to do this?

 

EDIT: Since I couldn't find a way I ended up just going with a small amount of reflection to get rid of the WorldEdit imports. Anyway thanks for you're help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.