cybertiger / Bukkit-EasyScript

Scripting plugin for Bukkit
GNU Lesser General Public License v3.0
11 stars 8 forks source link

Make location(s) of scripts folder(s) accessible without re-reading config #3

Open eode opened 9 years ago

eode commented 9 years ago

I'd like to make a small addition to library.py that automatically loads anything in /autoload. I may be missing something, as I'm not that familiar with Java, but looking through the source, I couldn't find any way to get the path of the scripts folder without re-loading the config.yml file.

If I'm correct, this can just be done by making EasyScript.config (or a copy of it) public, yes?

eode commented 9 years ago

Note: Currently I am able to easily get around this by creating my own ESConfig(), but it seems like I should be using the same esconfig object as EasyScript is using (or a fresh copy), rather than something loaded arbitrarily from the disk, which may have changed.

cybertiger commented 8 years ago

You're right there should probably be a public accessor for ESConfig, I'll add one, it'll probably be named getESConfig() or something similar.