Skip to content

Commit

Permalink
Add null check to portal info, fixes #277
Browse files Browse the repository at this point in the history
  • Loading branch information
JustRed23 committed Jun 15, 2024
1 parent f01a93c commit a898e98
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@
}

public boolean is(Entity p_20356_) {
@@ -2408,38 +_,88 @@
@@ -2408,38 +_,90 @@
this.portalEntrancePos = p_20362_.portalEntrancePos;
}

Expand Down Expand Up @@ -1007,7 +1007,9 @@
- ServerLevel.makeObsidianPlatform(p_20118_);
- }
+ // CraftBukkit start
+ p_20118_ = portalinfo.world;
+ if (portalinfo.world != null) //Ketting - null check
+ p_20118_ = portalinfo.world;
+
+ if (p_20118_ == level) {
+ // SPIGOT-6782: Just move the entity if a plugin changed the world to the one the entity is already in
+ moveTo(portalinfo.pos.x, portalinfo.pos.y, portalinfo.pos.z, portalinfo.yRot, portalinfo.xRot);
Expand Down

0 comments on commit a898e98

Please sign in to comment.