Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove listener when logging out #118

Open
wants to merge 1 commit into
base: 1.12
Choose a base branch
from

Conversation

WaitingIdly
Copy link
Collaborator

changes in this PR:

  • removes the player listener when the player is logging out

currently it just... stays there. waiting. listening.

@WaitingIdly WaitingIdly added the bugfix Fixes problems label Jul 6, 2024
Copy link

@jchung01 jchung01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small issue to fix, but otherwise looks good. Considering RLMixins has a similar mixin to fix this, would be good to fix the bug natively.

@@ -724,6 +724,12 @@ public void onEntityCreated(EntityJoinWorldEvent event) {
PlayerContainerListener.refreshListener((EntityPlayer) event.getEntity());
}

@SubscribeEvent
public static void onPlayerLoggedOut(PlayerEvent.PlayerLoggedOutEvent event) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Event listener cannot be static, we're registering an instance of EventHandler to the event bus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants