Fix null pointer in portal search config
Dieser Commit ist enthalten in:
Ursprung
3a77cce3c9
Commit
5e9cc3a228
@ -34,15 +34,16 @@ index be0ade74030c5f8584b5caa22d6d3084a0853afa..3bda9ab2a19740e3b06f24e2bcc82cc9
|
||||
return null;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 67c0d4e50aadc4712b941c7d2fff0d108e3acf17..d4673ac51ffc720362e849ec2da17daaceded4ca 100644
|
||||
index 67c0d4e50aadc4712b941c7d2fff0d108e3acf17..e140009e73517feea5f2c9923091a3d528e801af 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -818,7 +818,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -818,7 +818,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
// CraftBukkit start
|
||||
Location enter = this.getBukkitEntity().getLocation();
|
||||
Location exit = (worldserver == null) ? null : new Location(worldserver.getWorld(), d0, d1, d2, f1, f);
|
||||
- PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, 128, true, resourcekey == DimensionManager.THE_END ? 0 : 16);
|
||||
+ PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, worldserver.paperConfig.portalSearchRadius, true, resourcekey == DimensionManager.THE_END ? 0 : worldserver.paperConfig.portalCreateRadius);
|
||||
+ com.destroystokyo.paper.PaperWorldConfig config = worldserver != null ? worldserver.paperConfig : worldserver1.paperConfig; // Paper - portal radius
|
||||
+ PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, config.portalSearchRadius, true, resourcekey == DimensionManager.THE_END ? 0 : config.portalCreateRadius); // Paper - portal radius
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled() || event.getTo() == null) {
|
||||
return null;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index d4673ac51ffc720362e849ec2da17daaceded4ca..898ac661042381b99b98991f493538c0433ddb09 100644
|
||||
index e140009e73517feea5f2c9923091a3d528e801af..177f865688c40d0ecca72771007e2271626ab5cc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1569,20 +1569,28 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1570,20 +1570,28 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 69178bcfa328b79e8433805b650948fadc7b799b..8d190606262352254bc3cf65515d74baa49ffaeb 100644
|
||||
index b7f7dd59fd9deaff9ec3797b395c91c91ce5b54c..0f865f4f94d84da4eb6d0e1288ca7678a23545b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -4,7 +4,9 @@ import com.google.common.collect.Lists;
|
||||
@ -50,7 +50,7 @@ index 69178bcfa328b79e8433805b650948fadc7b799b..8d190606262352254bc3cf65515d74ba
|
||||
|
||||
this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint));
|
||||
}
|
||||
@@ -1435,7 +1444,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1436,7 +1445,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.lastHealthSent = -1.0F;
|
||||
this.lastFoodSent = -1;
|
||||
// this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
|
||||
Credit to prplz for figuring out the real issue
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 8d190606262352254bc3cf65515d74baa49ffaeb..2fa8c3e2491ff5947a99374c0678694d833bf659 100644
|
||||
index 0f865f4f94d84da4eb6d0e1288ca7678a23545b2..7227717f1ede5d67432f97f527c2d18f9d1c656f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1935,7 +1935,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1936,7 +1936,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@Override
|
||||
protected boolean isFrozen() {
|
||||
|
@ -34,7 +34,7 @@ index 08141147f9795546e9397abed95834ed5e69a126..d9e5d71a87140c90b79902887bd2f481
|
||||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 253dac9aff57f4311f8c3134caad760992bd340b..e050f21fb74ff28e1f18894dc5c9452e2c280c45 100644
|
||||
index 6414ff3ca7e5f217268f7114f7ac751532444af6..8a9a287074f2e91488f91ec9d8a7687c92f72099 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -411,7 +411,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -55,7 +55,7 @@ index 253dac9aff57f4311f8c3134caad760992bd340b..e050f21fb74ff28e1f18894dc5c9452e
|
||||
}
|
||||
|
||||
String deathMessage = event.getDeathMessage();
|
||||
@@ -1165,7 +1165,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1166,7 +1166,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
return OptionalInt.empty();
|
||||
} else {
|
||||
if (this.activeContainer != this.defaultContainer) {
|
||||
@ -64,7 +64,7 @@ index 253dac9aff57f4311f8c3134caad760992bd340b..e050f21fb74ff28e1f18894dc5c9452e
|
||||
}
|
||||
|
||||
this.nextContainerCounter();
|
||||
@@ -1225,7 +1225,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1226,7 +1226,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (this.activeContainer != this.defaultContainer) {
|
||||
@ -73,7 +73,7 @@ index 253dac9aff57f4311f8c3134caad760992bd340b..e050f21fb74ff28e1f18894dc5c9452e
|
||||
}
|
||||
|
||||
// this.nextContainerCounter(); // CraftBukkit - moved up
|
||||
@@ -1289,7 +1289,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1290,7 +1290,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
|
@ -19,10 +19,10 @@ spectate the target entity.
|
||||
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 8719381d942789bf80f4b0394cec12e7394ce871..f64a83a6a9f8aaa0c1bbd6c2e3d0af28c06cbbd6 100644
|
||||
index b360077d72afafcaa23c438eb073b9286c8fb563..e0d7bb9c1df2898ead246265f4ab2f05396f59c8 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1696,15 +1696,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1697,15 +1697,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity);
|
||||
}
|
||||
|
||||
|
@ -17,10 +17,10 @@ index a704feb0c19b56964d017f9e0ea3f26bc3e975f8..41c14d367e0b51e109001167d3c7b406
|
||||
return 300;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index f64a83a6a9f8aaa0c1bbd6c2e3d0af28c06cbbd6..6bdbe8081689c55a61e133c7b4d3d06d0c507d50 100644
|
||||
index e0d7bb9c1df2898ead246265f4ab2f05396f59c8..4b1923c81df02d0d48a5e61b9e4487d4a2fe789b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -2027,6 +2027,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -2028,6 +2028,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
this.setHealth(this.getMaxHealth());
|
||||
|
@ -112,10 +112,10 @@ index d6a98bb7fc107649c179cded2d37c06a41146a89..84de18a6c207612ec3d3cca61749934b
|
||||
this.a(entity);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 6bdbe8081689c55a61e133c7b4d3d06d0c507d50..80a9faf3b02c51efc1f55beebce173309628b9ab 100644
|
||||
index 4b1923c81df02d0d48a5e61b9e4487d4a2fe789b..76eff7dcb734f366b515d13a4a693adaa23695ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1133,11 +1133,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1134,11 +1134,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index ccf1a64d33038a73360f68a814bd46023c549cd2..b45e265ff95f9130009b0d5ba3e60644a7caa2ee 100644
|
||||
index af4fd8beab932589a832c7f4916bc669376a6615..3a6bd8e7d78d8c6188c0594c9806181f30abea32 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1399,6 +1399,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1400,6 +1400,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public void p() {
|
||||
this.co = true;
|
||||
this.ejectPassengers();
|
||||
|
@ -573,7 +573,7 @@ index 707db4febac59a4d09d6420ea2add469cf54c2ec..1597b7a882769109f467d81ecbadc45f
|
||||
|
||||
this.p = spawnercreature_d;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 3a3ffe5a544d9f73b0ac512f67629b1169110395..35aca074e4a0e1202441536f6b21f3731c490cc6 100644
|
||||
index 4099915aa00ef74a3e0e667a5036af3ee128cd36..e505f7c9b6e36262d01b5f8103db3df03a95a93d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -85,6 +85,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -596,7 +596,7 @@ index 3a3ffe5a544d9f73b0ac512f67629b1169110395..35aca074e4a0e1202441536f6b21f373
|
||||
}
|
||||
|
||||
// Yes, this doesn't match Vanilla, but it's the best we can do for now.
|
||||
@@ -1931,6 +1937,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1932,6 +1938,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657)
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 35aca074e4a0e1202441536f6b21f3731c490cc6..b33041765051f519807081607d2a8f1c75bb1fe7 100644
|
||||
index e505f7c9b6e36262d01b5f8103db3df03a95a93d..ec160ddedf8b6fcbfd357afcc5f9e58ed32e69d5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1018,6 +1018,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1019,6 +1019,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.lastHealthSent = -1.0F;
|
||||
this.lastFoodSent = -1;
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent opening inventories when frozen
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a941b11b58 100644
|
||||
index dad115496d3210e1471f1c4eb81989c27a8eb368..6ab11c9b5b6139d917cf1b69430173f0222c6c8b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -423,7 +423,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -17,7 +17,7 @@ index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a9
|
||||
this.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper
|
||||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
@@ -1278,7 +1278,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1279,7 +1279,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
this.activeContainer = container;
|
||||
@ -26,7 +26,7 @@ index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a9
|
||||
// CraftBukkit end
|
||||
container.addSlotListener(this);
|
||||
return OptionalInt.of(this.containerCounter);
|
||||
@@ -2073,7 +2073,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -2074,7 +2074,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -98,7 +98,7 @@ index 22acfe1350eb122b7eaa7209f519e4f4f1469b6c..2cada09ced1660526e9c112c2c8d92bb
|
||||
protected static final DataWatcherObject<NBTTagCompound> br = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p);
|
||||
protected static final DataWatcherObject<NBTTagCompound> bs = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index bfce9d46816cb80272b1825d322231a941b11b58..ef35e07fd8b27a66710140c1422f88ad512e774f 100644
|
||||
index 6ab11c9b5b6139d917cf1b69430173f0222c6c8b..0d624d35a86f77cc710162c302270535126ad13d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -2,6 +2,7 @@ package net.minecraft.server;
|
||||
@ -118,7 +118,7 @@ index bfce9d46816cb80272b1825d322231a941b11b58..ef35e07fd8b27a66710140c1422f88ad
|
||||
private long ch = SystemUtils.getMonotonicMillis();
|
||||
private Entity spectatedEntity;
|
||||
public boolean worldChangeInvuln;
|
||||
@@ -1682,6 +1683,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1683,6 +1684,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
public String locale = null; // CraftBukkit - lowercase // Paper - default to null
|
||||
public void a(PacketPlayInSettings packetplayinsettings) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren