mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8874)
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 Bukkit Changes: 6b3c598b PR-814: Add a method to send multiple equipment changes 181a984b Update Maven shade version to align with CraftBukkit a5a36e32 Revert "Update Maven shade version to align with CraftBukkit" 7a8f4a42 Update Maven shade version to align with CraftBukkit 58327201 Add support for Java 20 CraftBukkit Changes: b56426c7a PR-1142: Calculate explosion damage separately for each affected EntityComplexPart fbe3410af PR-1140: Add a method to send multiple equipment changes 8434e3633 Add support for Java 20 c998a1d23 Increase outdated build delay 4a929b5d6 SPIGOT-7267: Fix EntityType#getTranslationKey() and add unit test 086d8dc8a SPIGOT-7268: CraftMetaPotion reads ShowParticles and ShowIcon properties incorrectly 8ba5e399e SPIGOT-7262: Improve visibility API Spigot Changes: a2190e30 Rebuild patches
This commit is contained in:
parent
8d211062df
commit
d24a71e85d
31 changed files with 49 additions and 220 deletions
|
@ -232,14 +232,6 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ package org.bukkit.entity;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
+import com.destroystokyo.paper.ClientOption; // Paper
|
||||
import com.destroystokyo.paper.Title; // Paper
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.DyeColor;
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* Reset the cooldown counter to 0, effectively starting the cooldown period.
|
||||
*/
|
||||
|
@ -249,7 +241,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @return the client option value of the player
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ <T> T getClientOption(@NotNull ClientOption<T> option);
|
||||
+ <T> T getClientOption(@NotNull com.destroystokyo.paper.ClientOption<T> option);
|
||||
// Paper end
|
||||
|
||||
// Spigot start
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aya <31237389+tal5@users.noreply.github.com>
|
||||
Date: Fri, 20 Jan 2023 13:49:35 +0000
|
||||
Subject: [PATCH] Add Player#sendEquipmentChange(Map) API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param slot The slot of the spoofed equipment change
|
||||
* @param item The ItemStack to display for the player
|
||||
*/
|
||||
- public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item);
|
||||
+ // Paper start
|
||||
+ default void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item) {
|
||||
+ this.sendEquipmentChange(entity, java.util.Map.of(slot, item));
|
||||
+ };
|
||||
+
|
||||
+ /**
|
||||
+ * Send an equipment change for an entity. This fakes the equipment change
|
||||
+ * of an entity for a user. This will not actually change the inventory of
|
||||
+ * the specified entity in any way.
|
||||
+ *
|
||||
+ * @param entity The entity that the player will see the change for
|
||||
+ * @param equipmentChanges A map of slots to the items they will be changed to, cannot contain null values.
|
||||
+ */
|
||||
+ void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull java.util.Map<EquipmentSlot, ItemStack> equipmentChanges);
|
||||
+ // Paper end
|
||||
|
||||
// Paper start
|
||||
/**
|
|
@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @param message kick message
|
||||
+ * @param cause kick cause
|
||||
+ */
|
||||
+ void kick(final @Nullable Component message, @NotNull org.bukkit.event.player.PlayerKickEvent.Cause cause);
|
||||
+ void kick(final @Nullable net.kyori.adventure.text.Component message, @NotNull org.bukkit.event.player.PlayerKickEvent.Cause cause);
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,14 +8,6 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
import com.destroystokyo.paper.Title; // Paper
|
||||
+import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
public void sendMap(@NotNull MapView map);
|
||||
|
||||
|
@ -27,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * Use Section symbols for legacy color codes to send formatting.
|
||||
+ *
|
||||
+ * @param message The message to send
|
||||
+ * @deprecated use {@link #sendActionBar(Component)}
|
||||
+ * @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void sendActionBar(@NotNull String message);
|
||||
|
@ -39,7 +31,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ *
|
||||
+ * @param alternateChar Alternate symbol such as '&'
|
||||
+ * @param message The message to send
|
||||
+ * @deprecated use {@link #sendActionBar(Component)}
|
||||
+ * @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void sendActionBar(char alternateChar, @NotNull String message);
|
||||
|
@ -48,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * Sends an Action Bar message to the client.
|
||||
+ *
|
||||
+ * @param message The components to send
|
||||
+ * @deprecated use {@link #sendActionBar(Component)}
|
||||
+ * @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void sendActionBar(@NotNull net.md_5.bungee.api.chat.BaseComponent... message);
|
||||
|
@ -68,19 +60,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
spigot().sendMessage(position, components);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Sends the component to the specified screen position of this player
|
||||
*
|
||||
+ * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client.
|
||||
* @param position the screen position
|
||||
* @param component the components to send
|
||||
* @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Sends an array of components as a single message to the specified screen position of this player
|
||||
*
|
||||
+ * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client.
|
||||
* @param position the screen position
|
||||
* @param components the components to send
|
||||
* @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
|
||||
|
|
|
@ -2116,7 +2116,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start
|
||||
+ /**
|
||||
+ * Kicks the player with the default kick message.
|
||||
+ * @see #kick(Component)
|
||||
+ * @see #kick(net.kyori.adventure.text.Component)
|
||||
+ */
|
||||
+ void kick();
|
||||
+ /**
|
||||
|
@ -2132,7 +2132,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
*
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item);
|
||||
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items);
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
|
@ -2484,7 +2484,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
@ -2494,7 +2494,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
|
||||
|
|
|
@ -24,8 +24,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ api("org.apache.logging.log4j:log4j-api:2.17.1")
|
||||
+ api("org.slf4j:slf4j-api:1.8.0-beta4")
|
||||
|
||||
implementation("org.ow2.asm:asm:9.2")
|
||||
implementation("org.ow2.asm:asm-commons:9.2")
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4")
|
||||
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
|
|
|
@ -59,7 +59,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
+ testImplementation("junit:junit:4.13.2")
|
||||
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.3")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.4")
|
||||
+}
|
||||
+
|
||||
+configure<PublishingExtension> {
|
||||
|
@ -220,7 +220,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm-tree</artifactId>
|
||||
- <version>9.3</version>
|
||||
- <version>9.4</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
|
@ -274,7 +274,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-shade-plugin</artifactId>
|
||||
- <version>3.2.4</version>
|
||||
- <version>3.4.1</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>package</phase>
|
||||
|
@ -294,6 +294,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- </filters>
|
||||
- <!-- when downloading via Maven we can pull depends individually -->
|
||||
- <shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
- <!-- In 3.3.0 and later, shadedArtifactAttached causes dependant projects to use dependency reduced pom (bug?) -->
|
||||
- <createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
- </configuration>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
|
|
|
@ -164,7 +164,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- * @param alternateChar Alternate symbol such as '&'
|
||||
+ * @param alternateChar Alternate symbol such as '&'
|
||||
* @param message The message to send
|
||||
* @deprecated use {@link #sendActionBar(Component)}
|
||||
* @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/entity/Slime.java b/src/main/java/org/bukkit/entity/Slime.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
|
|
@ -34,5 +34,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Send the equipment change of an entity. This fakes the equipment change
|
||||
* of an entity for a user. This will not actually change the inventory of
|
||||
* Send an equipment change for the target entity. This will not
|
||||
* actually change the entity's equipment in any way.
|
||||
|
|
|
@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +0,0 @@ dependencies {
|
||||
implementation("org.ow2.asm:asm-commons:9.2")
|
||||
implementation("org.ow2.asm:asm-commons:9.4")
|
||||
// Paper end
|
||||
|
||||
- compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
|
|
|
@ -435,14 +435,6 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ package org.bukkit.entity;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
+import com.destroystokyo.paper.Title; // Paper
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
spigot().sendMessage(position, components);
|
||||
|
@ -544,14 +536,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ /**
|
||||
+ * Show the title to the player, overriding any previously displayed title.
|
||||
+ *
|
||||
+ * <p>This method overrides any previous title, use {@link #updateTitle(Title)} to change the existing one.</p>
|
||||
+ * <p>This method overrides any previous title, use {@link #updateTitle(com.destroystokyo.paper.Title)} to change the existing one.</p>
|
||||
+ *
|
||||
+ * @param title the title to send
|
||||
+ * @throws NullPointerException if the title is null
|
||||
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} or {@link #sendTitlePart(net.kyori.adventure.title.TitlePart, Object)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ void sendTitle(@NotNull Title title);
|
||||
+ void sendTitle(@NotNull com.destroystokyo.paper.Title title);
|
||||
+
|
||||
+ /**
|
||||
+ * Show the title to the player, overriding any previously displayed title.
|
||||
|
@ -563,7 +555,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} or {@link #sendTitlePart(net.kyori.adventure.title.TitlePart, Object)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ void updateTitle(@NotNull Title title);
|
||||
+ void updateTitle(@NotNull com.destroystokyo.paper.Title title);
|
||||
+
|
||||
+ /**
|
||||
+ * Hide any title that is currently visible to the player
|
||||
|
|
|
@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@NotNull
|
||||
<T> T getClientOption(@NotNull ClientOption<T> option);
|
||||
<T> T getClientOption(@NotNull com.destroystokyo.paper.ClientOption<T> option);
|
||||
+
|
||||
+ /**
|
||||
+ * Boost a Player that's {@link #isGliding()} using a {@link Firework}.
|
||||
|
|
|
@ -3397,7 +3397,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Deprecated // Paper
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
+
|
||||
+ }
|
||||
|
|
|
@ -14,8 +14,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
||||
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||
+
|
||||
+ implementation("org.ow2.asm:asm:9.2")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.2")
|
||||
+ implementation("org.ow2.asm:asm:9.4")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.4")
|
||||
// Paper end
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aya <31237389+tal5@users.noreply.github.com>
|
||||
Date: Fri, 20 Jan 2023 13:49:59 +0000
|
||||
Subject: [PATCH] Add Player#sendEquipmentChange(Map) API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.sendSignChange0(components, loc, dyeColor, hasGlowingText); // Paper
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
@Override
|
||||
- public void sendEquipmentChange(LivingEntity entity, EquipmentSlot slot, ItemStack item) {
|
||||
+ public void sendEquipmentChange(LivingEntity entity, Map<EquipmentSlot, ItemStack> equipmentChanges) {
|
||||
Preconditions.checkArgument(entity != null, "entity must not be null");
|
||||
- Preconditions.checkArgument(slot != null, "slot must not be null");
|
||||
- Preconditions.checkArgument(item != null, "item must not be null");
|
||||
+ Preconditions.checkNotNull(equipmentChanges, "equipmentChanges must not be null");
|
||||
|
||||
if (this.getHandle().connection == null) return;
|
||||
|
||||
- List<Pair<net.minecraft.world.entity.EquipmentSlot, net.minecraft.world.item.ItemStack>> equipment = Arrays.asList(
|
||||
- new Pair<>(CraftEquipmentSlot.getNMS(slot), CraftItemStack.asNMSCopy(item))
|
||||
- );
|
||||
+ List<Pair<net.minecraft.world.entity.EquipmentSlot, net.minecraft.world.item.ItemStack>> equipment = new ArrayList<>(equipmentChanges.size());
|
||||
+ for (Map.Entry<EquipmentSlot, ItemStack> entry : equipmentChanges.entrySet()) {
|
||||
+ Preconditions.checkNotNull(entry.getKey(), "EquipmentSlot key must not be null");
|
||||
+ Preconditions.checkNotNull(entry.getValue(), "ItemStack value must not be null");
|
||||
+ equipment.add(new Pair<>(CraftEquipmentSlot.getNMS(entry.getKey()), CraftItemStack.asNMSCopy(entry.getValue())));
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
this.getHandle().connection.send(new ClientboundSetEquipmentPacket(entity.getEntityId(), equipment));
|
||||
}
|
|
@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ implementation("io.netty:netty-codec-haproxy:4.1.87.Final") // Paper - Add support for proxy protocol
|
||||
// Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.3")
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
|
|
|
@ -2305,19 +2305,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
} else {
|
||||
this.chat(s, message, true);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
public void sendPlayerChatMessage(PlayerChatMessage message, ChatType.Bound params) {
|
||||
+ // Paper start
|
||||
+ if (!this.getCraftPlayer().canSee(message.link().sender())) {
|
||||
+ this.sendDisguisedChatMessage(message.decoratedContent(), params);
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
this.send(new ClientboundPlayerChatPacket(message.link().sender(), message.link().index(), message.signature(), message.signedBody().pack(this.messageSignatureCache), message.unsignedContent(), message.filterMask(), params.toNetwork(this.player.level.registryAccess())));
|
||||
this.addPendingMessage(message);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
|
@ -3508,19 +3495,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
@Override
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return !this.hiddenEntities.containsKey(entity.getUniqueId());
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ public boolean canSee(UUID entityUUID) {
|
||||
+ return !this.hiddenEntities.containsKey(entityUUID);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public Map<String, Object> serialize() {
|
||||
Map<String, Object> result = new LinkedHashMap<String, Object>();
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setResourcePack(String url) {
|
||||
|
|
|
@ -16,8 +16,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- exclude(group = "org.apache.logging.log4j", module = "log4j-api")
|
||||
- }
|
||||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.3")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.29")
|
||||
|
@ -78,7 +78,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
||||
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
|
|
|
@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ annotationProcessor("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - Needed to generate meta for our Log4j plugins
|
||||
// Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.3")
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
@@ -0,0 +0,0 @@ dependencies {
|
||||
testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
|
||||
implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
||||
|
|
|
@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -0,0 +0,0 @@ public class Main {
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
- System.err.println("*** Error, this build is outdated ***");
|
||||
+ // Paper start - This is some stupid bullshit
|
||||
|
|
|
@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation
|
||||
// Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.3")
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
|
|
|
@ -18,8 +18,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +0,0 @@ dependencies {
|
||||
implementation("org.ow2.asm:asm:9.3")
|
||||
implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
|
||||
testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
|
||||
+ implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
|
|
|
@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'.");
|
||||
return;
|
||||
}
|
||||
- if (javaVersion > 63.0) {
|
||||
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 19 is supported.");
|
||||
- if (javaVersion > 64.0) {
|
||||
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 20 is supported.");
|
||||
- return;
|
||||
- }
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") {
|
||||
+ exclude(group = "org.apache.logging.log4j", module = "log4j-api")
|
||||
+ }
|
||||
+ implementation("org.ow2.asm:asm:9.3")
|
||||
+ implementation("org.ow2.asm:asm:9.4")
|
||||
+ implementation("commons-lang:commons-lang:2.6")
|
||||
+ runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
||||
+ runtimeOnly("mysql:mysql-connector-java:8.0.29")
|
||||
|
@ -238,7 +238,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm</artifactId>
|
||||
- <version>9.3</version>
|
||||
- <version>9.4</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- Mojang depends -->
|
||||
|
@ -559,19 +559,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-shade-plugin</artifactId>
|
||||
- <version>3.2.4</version>
|
||||
- <dependencies>
|
||||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm</artifactId>
|
||||
- <version>9.3</version>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm-commons</artifactId>
|
||||
- <version>9.3</version>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
- <version>3.4.1</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>package</phase>
|
||||
|
|
|
@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -0,0 +0,0 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Thu, 16 Feb 2023 03:19:19 +0000
|
||||
Subject: [PATCH] Temp fix for EntityType.translationKey()
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
@Override
|
||||
public String getTranslationKey(EntityType entityType) {
|
||||
- return net.minecraft.world.entity.EntityType.byString(entityType.name()).map(net.minecraft.world.entity.EntityType::getDescriptionId).orElseThrow();
|
||||
+ // Paper start
|
||||
+ if (entityType.getName() == null || entityType == EntityType.UNKNOWN) {
|
||||
+ throw new IllegalArgumentException("Cannot lookup translation key of entity type " + entityType);
|
||||
+ }
|
||||
+ return net.minecraft.world.entity.EntityType.byString(entityType.getName()).map(net.minecraft.world.entity.EntityType::getDescriptionId).orElseThrow();
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
@Override
|
|
@ -10,8 +10,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +0,0 @@ dependencies {
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.3")
|
||||
implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
|
||||
+ testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
||||
|
|
|
@ -39,8 +39,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ runtimeOnly("org.apache.logging.log4j:log4j-core:2.14.1")
|
||||
+ // Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.3")
|
||||
implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 37262de84b9613e61809f31691e6f9db48dce0a8
|
||||
Subproject commit 6b3c598b975cca10e0027f624dc5115e0f32a0bc
|
|
@ -1 +1 @@
|
|||
Subproject commit a50301aa51aab7aa25869d921fa0c6a65eeda547
|
||||
Subproject commit b56426c7aeb086a363d7a8ee7f228b31249c7fb8
|
|
@ -1 +1 @@
|
|||
Subproject commit 19641c7577eefd3f47df12167c5e01f449bce47c
|
||||
Subproject commit a2190e302dde05a08e245990d97fb09184815583
|
Loading…
Reference in a new issue