Archiviert
13
0

[Auto] Updated Upstream (CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
a0149bf16 SPIGOT-6480: Players cannot take books from lecterns that were opened by plugins
Dieser Commit ist enthalten in:
Aikar 2021-05-29 05:07:34 -04:00
Ursprung 6bcd8b57c9
Commit e403d6aafc
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
10 geänderte Dateien mit 24 neuen und 24 gelöschten Zeilen

Datei anzeigen

@ -2086,10 +2086,10 @@ index eea242af23825ad29ada6e997205e87edffb6bb9..3cf81734c8580f4d88ea97b6ac737a37
public void setCustomName(String name) {
// sane limit for name length
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index ea41fe964a707b31394e0f4701eb88e7227fa3a7..2e9fd45d52a915a6eab7e75f7d30f4bf3506078b 100644
index 816f2cbebe849a9d9533f985298bcd5d36f660eb..24e856473a0050c0b097c179776350379d464d0c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -315,9 +315,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -318,9 +318,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
container = CraftEventFactory.callInventoryOpenEvent(player, container);
if (container == null) return;
@ -2104,7 +2104,7 @@ index ea41fe964a707b31394e0f4701eb88e7227fa3a7..2e9fd45d52a915a6eab7e75f7d30f4bf
getHandle().activeContainer = container;
getHandle().activeContainer.addSlotListener(player);
}
@@ -386,8 +389,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -389,8 +392,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
// Now open the window
Containers<?> windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory());

Datei anzeigen

@ -58,10 +58,10 @@ index ba26fc2405e17d582da971d03147fb1865e9b546..63e8062ae3f3407b92b72b5fccaa958c
@Override
public abstract boolean isSpectator();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 2e9fd45d52a915a6eab7e75f7d30f4bf3506078b..c13f04de0d22ddf51c1f0c26c72da6062c07d8cf 100644
index 24e856473a0050c0b097c179776350379d464d0c..893cea754ea1858d2b08ba377bbbc90e7c0efd6d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -492,6 +492,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -495,6 +495,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
getHandle().getCooldownTracker().setCooldown(CraftMagicNumbers.getItem(material), ticks);
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add method to open already placed sign
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index c13f04de0d22ddf51c1f0c26c72da6062c07d8cf..16f907df4690098e6c45191963f1f98e2c505f82 100644
index 893cea754ea1858d2b08ba377bbbc90e7c0efd6d..1333d425147e6dc7f21f755a9b25ead9723d4a28 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -29,6 +29,7 @@ import net.minecraft.world.level.block.BlockEnchantmentTable;
@ -16,7 +16,7 @@ index c13f04de0d22ddf51c1f0c26c72da6062c07d8cf..16f907df4690098e6c45191963f1f98e
import net.minecraft.world.level.block.state.IBlockData;
import org.bukkit.GameMode;
import org.bukkit.Location;
@@ -602,6 +603,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -605,6 +606,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
}

Datei anzeigen

@ -152,10 +152,10 @@ index 3c49d7acd4ad0717886adf6c469e8a49a58e859b..b6effe1037f3ae59e6faa5f5d039b6ad
this.activeContainer = this.defaultContainer;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 16f907df4690098e6c45191963f1f98e2c505f82..744cd929383ba56cd3435c8c092c8242b4e347e6 100644
index 1333d425147e6dc7f21f755a9b25ead9723d4a28..3b3e6076f2565e02fa6f13e369094f8b6cac5382 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -372,7 +372,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -375,7 +375,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
if (((EntityPlayer) getHandle()).playerConnection == null) return;
if (getHandle().activeContainer != getHandle().defaultContainer) {
// fire INVENTORY_CLOSE if one already open
@ -164,7 +164,7 @@ index 16f907df4690098e6c45191963f1f98e2c505f82..744cd929383ba56cd3435c8c092c8242
}
EntityPlayer player = (EntityPlayer) getHandle();
Container container;
@@ -442,8 +442,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -445,8 +445,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@Override
public void closeInventory() {

Datei anzeigen

@ -36,10 +36,10 @@ index 79003f43c4f15a7e5dd51587bc8c2f477bedb1b2..5382dfbad7a33670268d5d713cf3bdd4
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 744cd929383ba56cd3435c8c092c8242b4e347e6..5e01ea53306acec8988aaccec62cd33e14156eef 100644
index 3b3e6076f2565e02fa6f13e369094f8b6cac5382..3bfb93890259210afd2f5e226cef100d26a11628 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -321,7 +321,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -324,7 +324,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
if (adventure$title == null) adventure$title = io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(container.getBukkitView().getTitle()); // Paper
//player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper // Paper - comment
@ -48,7 +48,7 @@ index 744cd929383ba56cd3435c8c092c8242b4e347e6..5e01ea53306acec8988aaccec62cd33e
getHandle().activeContainer = container;
getHandle().activeContainer.addSlotListener(player);
}
@@ -395,7 +395,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -398,7 +398,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper
if (adventure$title == null) adventure$title = io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(inventory.getTitle()); // Paper
//player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment

Datei anzeigen

@ -8,7 +8,7 @@ Adds a new method to fetch the location of a player's bed without generating any
getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 5e01ea53306acec8988aaccec62cd33e14156eef..6fa61912cf9e4632bf4e11bd252aa26100f27531 100644
index 3bfb93890259210afd2f5e226cef100d26a11628..4028f4bd87a183a808f4c9a19d51ee1c9b9e30f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -13,6 +13,7 @@ import net.minecraft.network.chat.IChatBaseComponent;
@ -19,7 +19,7 @@ index 5e01ea53306acec8988aaccec62cd33e14156eef..6fa61912cf9e4632bf4e11bd252aa261
import net.minecraft.world.ITileInventory;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityTypes;
@@ -126,6 +127,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -127,6 +128,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
return getHandle().sleepTicks;
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add additional open container api to HumanEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 6fa61912cf9e4632bf4e11bd252aa26100f27531..f13abfc93f6dbb22abc55d836c43c613d07d4c20 100644
index 4028f4bd87a183a808f4c9a19d51ee1c9b9e30f7..0a0e9df604723802fe65d871ff48aa9fd9b756bf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -457,6 +457,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -460,6 +460,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
return this.getHandle().activeContainer.getBukkitView();
}

Datei anzeigen

@ -17,10 +17,10 @@ index e7c29d194d5c3e3b1b79228758f7a3d8aa060fbd..9c6330da4e026a7753698b5d103c0097
((ContainerProperty) this.d.get(i)).set(j);
}
diff --git a/src/main/java/net/minecraft/world/inventory/ContainerLectern.java b/src/main/java/net/minecraft/world/inventory/ContainerLectern.java
index 910c3eab0675b84694317427d7317caba89d74c3..10c829efd9ecb7dfa29e92586f99e40a8984f840 100644
index 70d9ebca8d176d6483f104bd03598753811fc154..65687792351fbd561b1f4d6f88bc7288b6d8346f 100644
--- a/src/main/java/net/minecraft/world/inventory/ContainerLectern.java
+++ b/src/main/java/net/minecraft/world/inventory/ContainerLectern.java
@@ -13,6 +13,7 @@ import org.bukkit.craftbukkit.inventory.CraftInventoryView;
@@ -14,6 +14,7 @@ import org.bukkit.craftbukkit.inventory.CraftInventoryView;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTakeLecternBookEvent;
// CraftBukkit end
@ -28,7 +28,7 @@ index 910c3eab0675b84694317427d7317caba89d74c3..10c829efd9ecb7dfa29e92586f99e40a
public class ContainerLectern extends Container {
@@ -60,6 +61,7 @@ public class ContainerLectern extends Container {
@@ -61,6 +62,7 @@ public class ContainerLectern extends Container {
@Override
public boolean a(EntityHuman entityhuman, int i) {
int j;
@ -36,7 +36,7 @@ index 910c3eab0675b84694317427d7317caba89d74c3..10c829efd9ecb7dfa29e92586f99e40a
if (i >= 100) {
j = i - 100;
@@ -69,11 +71,25 @@ public class ContainerLectern extends Container {
@@ -70,11 +72,25 @@ public class ContainerLectern extends Container {
switch (i) {
case 1:
j = this.containerProperties.getProperty(0);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index f13abfc93f6dbb22abc55d836c43c613d07d4c20..a5507f7907e211caff5c79650b26e116b0e64af2 100644
index 0a0e9df604723802fe65d871ff48aa9fd9b756bf..6e28e0247200fbbc470ba317575f0c714f74d5bf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -122,6 +122,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -123,6 +123,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
}

@ -1 +1 @@
Subproject commit 5912843493372e6d738711f2131cad9c48f746b4
Subproject commit a0149bf16579fe48689a5051a39ff776913ee853