File tree Expand file tree Collapse file tree
core/src/main/java/org/geysermc/geyser/session/cache/waypoint Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,12 @@ public void handlePacket(ClientboundTrackedWaypointPacket packet) {
6666 }
6767
6868 public void addEntity (Entity entity ) {
69- GeyserWaypoint waypoint = waypoints .get (entity .uuid ().toString ());
69+ UUID uuid = entity .uuid ();
70+ if (uuid == null ) {
71+ return ;
72+ }
73+
74+ GeyserWaypoint waypoint = waypoints .get (uuid .toString ());
7075 if (waypoint != null ) {
7176 // On 1.26.0 and below:
7277 // This will remove the fake player packet previously sent to the client,
@@ -91,7 +96,12 @@ public void addEntity(Entity entity) {
9196 }
9297
9398 public void removeEntity (Entity entity ) {
94- GeyserWaypoint waypoint = waypoints .get (entity .uuid ().toString ());
99+ UUID uuid = entity .uuid ();
100+ if (uuid == null ) {
101+ return ;
102+ }
103+
104+ GeyserWaypoint waypoint = waypoints .get (uuid .toString ());
95105 if (waypoint != null ) {
96106 // On 1.26.0 and below:
97107 // This will remove the player packet previously sent to the client,
You can’t perform that action at this time.
0 commit comments