SPIGOT-5972: PlayerPortalEvent.setTo() when returning through an End Portal Crashes Server

This commit is contained in:
md_5 2020-07-09 19:11:45 +10:00
parent 72f3689092
commit dba91d2ab6
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -475,7 +475,7 @@
+ exit.setZ(k);
+ // this.setMot(Vec3D.a);
+ exitVelocity = Vec3D.a;
+ } else {
+ } else if (worldserver.getTypeKey() == DimensionManager.THE_NETHER || worldserver1.getTypeKey() == DimensionManager.THE_NETHER) {
+ ShapeDetector.Shape portalShape = worldserver.getTravelAgent().findAndTeleport(this, exitPosition, f2, event.getSearchRadius(), true);
+ if (portalShape == null && event.getCanCreatePortal()) {
+ if (worldserver.getTravelAgent().createPortal(this, exitPosition, event.getCreationRadius())) { // Only check for new portal if creation succeeded