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

fix: Fix NPE in UserInfoModel #591

Merged
merged 7 commits into from
Oct 22, 2022
Merged

fix: Fix NPE in UserInfoModel #591

merged 7 commits into from
Oct 22, 2022

Conversation

kristofbolyai
Copy link
Member

No description provided.

@kristofbolyai kristofbolyai requested a review from a team October 22, 2022 18:00
@@ -72,7 +72,7 @@ public static void onWorldStateChange(WorldStateEvent event) {

@SubscribeEvent
public static void onPlayerJoin(PlayerJoinedWorldEvent event) {
if (event.getPlayerId() == null) return;
if (event.getPlayerId() == null || event.getPlayerInfo() == null) return;
String name = event.getPlayerInfo().getProfile().getName();
if (name.contains("\u0001") || name.contains("§")) return; // avoid player npcs
Copy link
Contributor

Choose a reason for hiding this comment

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

We can export the npc check now to the method iirc

@kristofbolyai
Copy link
Member Author

forgot to push lmao @Incompleteusern a34fe90

@kristofbolyai kristofbolyai merged commit 5961da8 into main Oct 22, 2022
@kristofbolyai kristofbolyai deleted the npe_fix_userinfomodel branch October 22, 2022 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants