mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-13 01:51:39 -07:00
Switch back over to using flat-file plugin info, auto-copy properties files in gradle
This commit is contained in:
parent
dd52e7e9fb
commit
029c13233f
33 changed files with 70 additions and 85 deletions
|
|
@ -103,11 +103,16 @@ public class PluginRepository {
|
|||
|
||||
Class<?> clazz = loader.loadClass(file.getName() + ".plugin");
|
||||
|
||||
PluginInfo info;
|
||||
if (infoFile.exists())
|
||||
info = PluginInfo.loadFromFile(infoFile);
|
||||
else
|
||||
info = PluginInfo.loadFromClass(clazz);
|
||||
PluginInfo info = null;
|
||||
try {
|
||||
if (infoFile.exists())
|
||||
info = PluginInfo.loadFromFile(infoFile);
|
||||
else
|
||||
info = PluginInfo.loadFromClass(clazz);
|
||||
} catch (Exception e) {
|
||||
System.err.println("Unable to load plugin " + file.getName() + " because there were issues parsing its info: ");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (info == null) {
|
||||
System.err.println("Unable to load plugin " + file.getName() + " because it contains no information about author, version, etc!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue