mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-10-28 14:30:49 +01:00
Bridge now registers listeners during reload (they're unregistered)
This commit is contained in:
parent
62264ce1fd
commit
5df1145199
@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* Licence is provided in the jar as license.yml also here:
|
* Licence is provided in the jar as license.yml also here:
|
||||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
||||||
*/
|
*/
|
||||||
@ -19,8 +19,6 @@ import com.djrapitops.pluginbridge.plan.Hook;
|
|||||||
*/
|
*/
|
||||||
public class AdvancedAntiCheatHook extends Hook {
|
public class AdvancedAntiCheatHook extends Hook {
|
||||||
|
|
||||||
private static PlayerHackKickListener listener;
|
|
||||||
|
|
||||||
public AdvancedAntiCheatHook(HookHandler hookHandler) {
|
public AdvancedAntiCheatHook(HookHandler hookHandler) {
|
||||||
super("me.konsolas.aac.AAC", hookHandler);
|
super("me.konsolas.aac.AAC", hookHandler);
|
||||||
}
|
}
|
||||||
@ -40,10 +38,7 @@ public class AdvancedAntiCheatHook extends Hook {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (listener == null) {
|
plugin.registerListener(new PlayerHackKickListener());
|
||||||
listener = new PlayerHackKickListener();
|
|
||||||
plugin.registerListener(listener);
|
|
||||||
}
|
|
||||||
addPluginDataSource(new AdvancedAntiCheatData(table));
|
addPluginDataSource(new AdvancedAntiCheatData(table));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* Licence is provided in the jar as license.yml also here:
|
* Licence is provided in the jar as license.yml also here:
|
||||||
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
* https://github.com/Rsl1122/Plan-PlayerAnalytics/blob/master/Plan/src/main/resources/license.yml
|
||||||
*/
|
*/
|
||||||
@ -20,8 +20,6 @@ import com.djrapitops.pluginbridge.plan.viaversion.ProtocolTable;
|
|||||||
*/
|
*/
|
||||||
public class ProtocolSupportHook extends Hook {
|
public class ProtocolSupportHook extends Hook {
|
||||||
|
|
||||||
private static PlayerVersionListener listener;
|
|
||||||
|
|
||||||
public ProtocolSupportHook(HookHandler hookHandler) {
|
public ProtocolSupportHook(HookHandler hookHandler) {
|
||||||
super("protocolsupport.ProtocolSupport", hookHandler);
|
super("protocolsupport.ProtocolSupport", hookHandler);
|
||||||
}
|
}
|
||||||
@ -39,10 +37,7 @@ public class ProtocolSupportHook extends Hook {
|
|||||||
Log.toLog(this.getClass().getName(), e);
|
Log.toLog(this.getClass().getName(), e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (listener == null) {
|
plan.registerListener(new PlayerVersionListener());
|
||||||
listener = new PlayerVersionListener();
|
|
||||||
plan.registerListener(listener);
|
|
||||||
}
|
|
||||||
addPluginDataSource(new ProtocolSupportData(table));
|
addPluginDataSource(new ProtocolSupportData(table));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -44,10 +44,7 @@ public class ViaVersionHook extends Hook {
|
|||||||
Log.toLog(this.getClass().getName(), e);
|
Log.toLog(this.getClass().getName(), e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (listener == null) {
|
plan.registerListener(new PlayerVersionListener(api));
|
||||||
listener = new PlayerVersionListener(api);
|
|
||||||
plan.registerListener(listener);
|
|
||||||
}
|
|
||||||
addPluginDataSource(new ViaVersionData(table));
|
addPluginDataSource(new ViaVersionData(table));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user