diff --git a/pom.xml b/pom.xml
index d0f8df0..2dcc332 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.ghostchu.peerbanhelper
BiglyBT-PBH-Plugin
- 1.2.5
+ 1.2.6
jar
diff --git a/src/main/java/com/ghostchu/peerbanhelper/downloaderplug/biglybt/Plugin.java b/src/main/java/com/ghostchu/peerbanhelper/downloaderplug/biglybt/Plugin.java
index 25e9daf..b95a95b 100644
--- a/src/main/java/com/ghostchu/peerbanhelper/downloaderplug/biglybt/Plugin.java
+++ b/src/main/java/com/ghostchu/peerbanhelper/downloaderplug/biglybt/Plugin.java
@@ -151,7 +151,7 @@ public void unload() throws PluginException {
if (webContainer != null) {
webContainer.stop();
}
- if(clientIDGeneratorOriginal != null){
+ if (clientIDGeneratorOriginal != null) {
ClientIDManagerImpl.getSingleton().setGenerator(clientIDGeneratorOriginal, true);
}
}
@@ -281,9 +281,9 @@ private void handleBanListApplied(Context context) throws IPFilterException {
}
public ConnectorData getConnectorData() {
- if(useClientIdModifier) {
+ if (useClientIdModifier) {
return connectorData;
- }else{
+ } else {
return null;
}
}
@@ -510,6 +510,11 @@ private PeerRecord getPeerRecord(Peer peer) {
}
if (peer.getIp().endsWith(".i2p") || peer.getIp().endsWith(".onion") || peer.getIp().endsWith(".tor"))
return null;
+ com.biglybt.pif.messaging.Message[] messages = new Message[0];
+ try {
+ messages = peer.getSupportedMessages();
+ } catch (NullPointerException ignored) {
+ }
return new PeerRecord(
peer.isMyPeer(),
peer.getState(),
@@ -537,7 +542,7 @@ private PeerRecord getPeerRecord(Peer peer) {
peer.supportsMessaging(),
peer.isPriorityConnection(),
peer.getHandshakeReservedBytes(),
- Arrays.stream(peer.getSupportedMessages()).map(Message::getID).collect(Collectors.toList())
+ Arrays.stream(messages).map(Message::getID).collect(Collectors.toList())
);
}