This repository was archived by the owner on Apr 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
bukkit/src/main/java/ch/andre601/advancedserverlist Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public class JoinEvent<F> implements Listener{
3939
4040 private final BukkitCore <F > plugin ;
4141
42- public JoinEvent (BukkitCore <F > plugin ){
42+ private JoinEvent (BukkitCore <F > plugin ){
4343 this .plugin = plugin ;
4444 Bukkit .getPluginManager ().registerEvents (this , plugin );
4545 }
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ public void loadCommands(){
7878
7979 @ Override
8080 public void loadEvents (){
81- new JoinEvent (this );
82- new PaperPingEvent (this );
81+ JoinEvent . init (this );
82+ PaperPingEvent . init (this );
8383 }
8484
8585 @ Override
Original file line number Diff line number Diff line change @@ -35,11 +35,15 @@ public class PaperPingEvent implements Listener{
3535
3636 private final PaperCore plugin ;
3737
38- public PaperPingEvent (PaperCore plugin ){
38+ private PaperPingEvent (PaperCore plugin ){
3939 this .plugin = plugin ;
4040 plugin .getServer ().getPluginManager ().registerEvents (this , plugin );
4141 }
4242
43+ public static void init (PaperCore plugin ){
44+ new PaperPingEvent (plugin );
45+ }
46+
4347 @ EventHandler
4448 public void onPaperServerListPing (PaperServerListPingEvent event ){
4549 PingEventHandler .handleEvent (new PaperEventWrapper (plugin , event ));
You can’t perform that action at this time.
0 commit comments