Skip to content

Commit

Permalink
fix null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
xzxADIxzx committed Jun 18, 2023
1 parent 55fd07e commit 6ac89a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mod.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ A mod that increases the schematic size limit to 512 blocks! Adds admins, render
",
author: "[#0096FF]xzxADIxzx",
minGameVersion: 145,
version: 2.7.70,
version: 2.7.71,
hidden: true,
main: scheme.Main
4 changes: 3 additions & 1 deletion src/java/scheme/ServerIntegration.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public static void load() {
// region Server

Events.on(PlayerJoin.class, event -> Call.clientPacketReliable(event.player.con, "SendMeSubtitle", player == null ? null : String.valueOf(player.id)));
Events.on(PlayerLeave.class, event -> SSUsers.remove(event.player.id));
Events.on(PlayerLeave.class, event -> {
if (event.player != null/* how? */) SSUsers.remove(event.player.id);
});

netServer.addPacketHandler("MySubtitle", (target, args) -> {
SSUsers.put(target.id, args);
Expand Down

0 comments on commit 6ac89a8

Please sign in to comment.