Getting an external plugin api?

33 views
Skip to first unread message

Nathaniel Szpunar

unread,
Apr 1, 2020, 10:34:28 AM4/1/20
to ScriptCraft - Scripting Minecraft
I read the documentation on this, but when I get a plugin through PluginManage#getPlugin, it just returns a string with the version name, not the actual plugin API. Is there a maven repo so that I can add the plugin as a maven dependency, and then rebuild the plugin? Or is there another way to do this?

Josh Wulf

unread,
Apr 2, 2020, 2:55:19 AM4/2/20
to ScriptCraft - Scripting Minecraft
When you say that it just returns a string with the version name - do you derive this by calling print or console.log on it? Because if you do, then what you see is the result of calling the toString() method on it. 


Nathaniel Szpunar

unread,
Apr 2, 2020, 11:08:51 AM4/2/20
to ScriptCraft - Scripting Minecraft
Yeah, I get that, but any methods that I call on it don't work, and they give a "method not found" type error. (thanks for answering btw didn't think anyone would)

Josh Wulf

unread,
Apr 2, 2020, 11:37:26 PM4/2/20
to ScriptCraft - Scripting Minecraft
Try calling getName() on the returned object. That will eliminate the case where you have a plugin, and the method you are calling legit doesn't exist.

If you have a code sample, it would be easier to help you.

Josh
Reply all
Reply to author
Forward
0 new messages