client: Set JarPluginRepository#comparator to null

The default pf4j comparator casts longs to ints which breaks
the sort. Since we don't actually rely on this sorting, simply
set the comparator to `null`.

See https://github.com/open-osrs/runelite/pull/2621 for more info
This commit is contained in:
swazrgb
2020-05-25 15:47:48 +02:00
parent 0c8af5636f
commit b8bf019667

View File

@@ -74,6 +74,12 @@ class ExternalPf4jPluginManager extends DefaultPluginManager
if (isNotDevelopment())
{
JarPluginRepository jarPluginRepository = new JarPluginRepository(getPluginsRoot());
// Default pf4j comparator crashes on some systems (https://github.com/open-osrs/runelite/pull/2621)
// We also don't care about plugin order at this point, pf4j will sort by Plugin-Dependencies
// and we re-sort later based on `@PluginDependency`
jarPluginRepository.setComparator(null);
compoundPluginRepository.add(jarPluginRepository);
}