Skip to content

Commit

Permalink
Fix NPE on player join but terminating connection
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonHorkles committed Apr 13, 2024
1 parent 8b9c3ff commit 7ae6ece
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SilverstoneProxy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>net.silverstonemc</groupId>
<artifactId>SilverstoneProxy</artifactId>
<version>3.1.2</version>
<version>3.1.3</version>

<properties>
<maven.compiler.source>21</maven.compiler.source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public boolean setNickname(@Nullable Player player, CommandSource sender, @Nulla
// Set the player's display name without saving anything
@SuppressWarnings("DataFlowIssue")
public void changeDisplayName(Player player, Component nickname) {
if (player == null) return;

TabPlayer tabPlayer = TabAPI.getInstance().getPlayer(player.getUniqueId());
if (nickname == null) {
TabAPI.getInstance().getTabListFormatManager().setName(tabPlayer, null);
Expand Down

0 comments on commit 7ae6ece

Please sign in to comment.