mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
Bridge now registers listeners during reload (they're unregistered)
This commit is contained in:
parent
62264ce1fd
commit
5df1145199
@ -19,8 +19,6 @@ import com.djrapitops.pluginbridge.plan.Hook;
|
||||
*/
|
||||
public class AdvancedAntiCheatHook extends Hook {
|
||||
|
||||
private static PlayerHackKickListener listener;
|
||||
|
||||
public AdvancedAntiCheatHook(HookHandler hookHandler) {
|
||||
super("me.konsolas.aac.AAC", hookHandler);
|
||||
}
|
||||
@ -40,10 +38,7 @@ public class AdvancedAntiCheatHook extends Hook {
|
||||
return;
|
||||
}
|
||||
|
||||
if (listener == null) {
|
||||
listener = new PlayerHackKickListener();
|
||||
plugin.registerListener(listener);
|
||||
}
|
||||
plugin.registerListener(new PlayerHackKickListener());
|
||||
addPluginDataSource(new AdvancedAntiCheatData(table));
|
||||
}
|
||||
}
|
@ -20,8 +20,6 @@ import com.djrapitops.pluginbridge.plan.viaversion.ProtocolTable;
|
||||
*/
|
||||
public class ProtocolSupportHook extends Hook {
|
||||
|
||||
private static PlayerVersionListener listener;
|
||||
|
||||
public ProtocolSupportHook(HookHandler hookHandler) {
|
||||
super("protocolsupport.ProtocolSupport", hookHandler);
|
||||
}
|
||||
@ -39,10 +37,7 @@ public class ProtocolSupportHook extends Hook {
|
||||
Log.toLog(this.getClass().getName(), e);
|
||||
return;
|
||||
}
|
||||
if (listener == null) {
|
||||
listener = new PlayerVersionListener();
|
||||
plan.registerListener(listener);
|
||||
}
|
||||
plan.registerListener(new PlayerVersionListener());
|
||||
addPluginDataSource(new ProtocolSupportData(table));
|
||||
}
|
||||
}
|
@ -44,10 +44,7 @@ public class ViaVersionHook extends Hook {
|
||||
Log.toLog(this.getClass().getName(), e);
|
||||
return;
|
||||
}
|
||||
if (listener == null) {
|
||||
listener = new PlayerVersionListener(api);
|
||||
plan.registerListener(listener);
|
||||
}
|
||||
plan.registerListener(new PlayerVersionListener(api));
|
||||
addPluginDataSource(new ViaVersionData(table));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user