forked from 4drian3d/UnSignedVelocity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Avoid creating packet listener instances twice and instead regis…
…ter the current packet listener instance if it is loadable
- Loading branch information
1 parent
f2d9f92
commit 23cdda2
Showing
8 changed files
with
25 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
src/main/java/io/github/_4drian3d/unsignedvelocity/listener/LoadableEventListener.java
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
src/main/java/io/github/_4drian3d/unsignedvelocity/listener/LoadablePacketListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.github._4drian3d.unsignedvelocity.listener; | ||
|
||
import com.github.retrooper.packetevents.PacketEvents; | ||
import com.github.retrooper.packetevents.event.PacketListenerCommon; | ||
|
||
public interface LoadablePacketListener { | ||
default void register() { | ||
PacketEvents.getAPI().getEventManager().registerListener((PacketListenerCommon) this); | ||
} | ||
|
||
boolean canBeLoaded(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters