Skip to content

Commit

Permalink
Updated pf4j to 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Aquazus committed Nov 25, 2018
1 parent 61f06f1 commit 520d436
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<dependency>
<groupId>org.pf4j</groupId>
<artifactId>pf4j</artifactId>
<version>2.3.0</version>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
14 changes: 11 additions & 3 deletions src/main/java/fr/aquazus/d1proxy/plugins/ProxyPluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import fr.aquazus.d1proxy.Proxy;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.pf4j.DefaultPluginManager;
import org.pf4j.PluginManager;
import org.pf4j.*;

import java.util.ArrayList;
import java.util.Collections;
Expand All @@ -21,7 +20,16 @@ public class ProxyPluginManager {
public ProxyPluginManager(Proxy proxy) {
log.info("Loading plugin system...");
this.proxy = proxy;
this.manager = new DefaultPluginManager();
this.manager = new DefaultPluginManager() {
@Override
protected PluginLoader createPluginLoader() {
return new JarPluginLoader(this);
}
@Override
protected PluginDescriptorFinder createPluginDescriptorFinder() {
return new ManifestPluginDescriptorFinder();
}
};
this.plugins = Collections.synchronizedList(new ArrayList<>());
}

Expand Down

0 comments on commit 520d436

Please sign in to comment.