Updated Upstream (Bukkit/CraftBukkit) (#9342)

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:
fdff0cd4 PR-869: Add Enderman#teleport and Enderman#teleportTowards
dfd86ee7 Improve sendSignChange and related documentation
beced2b2 PR-867: Add Player#sendBlockUpdate to send tile entity updates

CraftBukkit Changes:
ad6d0cffb SPIGOT-7394: Fix another issue with sendSignChange
66c5ce4c7 SPIGOT-7391: Preserve vanilla sign json where not modified by event
ae3824f94 PR-1204: Add Enderman#teleport and Enderman#teleportTowards
5863a2eae Fix sendSignChange not working
4a7eadc97 PR-1201: Add Player#sendBlockUpdate to send tile entity updates
789324e30 Work around issue placing decorated pots
This commit is contained in:
Jake Potrebic 2023-06-16 03:28:31 -07:00 committed by GitHub
parent f7b386ddc7
commit 41e6f20420
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
88 changed files with 271 additions and 305 deletions

View File

@ -2080,10 +2080,10 @@ index f3afe67f0832cb828d25be3654518ff73a80b0e1..598abaa82c634178043a29f6caa6ac52
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd102492cf 100644
index 6860eb5e85d115d1c00ace8c646ccc080bff29ce..84e63caeabe3e44381a464bde47bcadaddba9d43 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -42,7 +42,41 @@ import org.jetbrains.annotations.Nullable;
@@ -43,7 +43,41 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a player, connected or not
*/
@ -2126,7 +2126,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* {@inheritDoc}
@@ -59,7 +93,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -60,7 +94,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* places defined by plugins.
*
* @return the friendly name
@ -2136,7 +2136,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
@NotNull
public String getDisplayName();
@@ -71,15 +107,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -72,15 +108,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* places defined by plugins.
*
* @param name The new display name.
@ -2187,7 +2187,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public String getPlayerListName();
/**
@@ -88,14 +159,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -89,14 +160,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* If the value is null, the name will be identical to {@link #getName()}.
*
* @param name new player list name
@ -2206,7 +2206,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
@Nullable
public String getPlayerListHeader();
@@ -103,7 +178,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -104,7 +179,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Gets the currently displayed player list footer for this player.
*
* @return player list header or null
@ -2216,7 +2216,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
@Nullable
public String getPlayerListFooter();
@@ -111,14 +188,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -112,14 +189,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Sets the currently displayed player list header for this player.
*
* @param header player list header, null for empty
@ -2235,7 +2235,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void setPlayerListFooter(@Nullable String footer);
/**
@@ -127,7 +208,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -128,7 +209,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param header player list header, null for empty
* @param footer player list footer, null for empty
@ -2245,7 +2245,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void setPlayerListHeaderFooter(@Nullable String header, @Nullable String footer);
/**
@@ -165,9 +248,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -166,9 +249,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Kicks player with custom kick message.
*
* @param message kick message
@ -2271,7 +2271,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* Says a message (or runs a command).
*
@@ -632,6 +731,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -633,6 +732,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items);
@ -2362,7 +2362,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* Send a sign change. This fakes a sign change packet for a user at
* a certain location. This will not actually change the world in any way.
@@ -646,7 +829,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -650,7 +833,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param lines the new text on the sign or null to clear it
* @throws IllegalArgumentException if location is null
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
@ -2372,7 +2372,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
/**
@@ -665,7 +850,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -672,7 +857,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException if location is null
* @throws IllegalArgumentException if dyeColor is null
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
@ -2382,7 +2382,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException;
/**
@@ -685,7 +872,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -695,7 +882,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException if location is null
* @throws IllegalArgumentException if dyeColor is null
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
@ -2392,7 +2392,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;
/**
@@ -1181,6 +1370,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1211,6 +1400,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* pack correctly.
* </ul>
*
@ -2400,7 +2400,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
* @param url The URL from which the client will download the resource
* pack. The string must contain only US-ASCII characters and should
* be encoded as per RFC 1738.
@@ -1237,8 +1427,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1267,8 +1457,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2458,7 +2458,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* Request that the player's client download and switch resource packs.
* <p>
@@ -1268,6 +1507,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1298,6 +1537,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* pack correctly.
* </ul>
*
@ -2466,7 +2466,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
* @param url The URL from which the client will download the resource
* pack. The string must contain only US-ASCII characters and should
* be encoded as per RFC 1738.
@@ -1328,8 +1568,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1358,8 +1598,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2524,7 +2524,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* Gets the Scoreboard displayed to this player
*
@@ -1445,7 +1734,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1475,7 +1764,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param title Title text
* @param subtitle Subtitle text
@ -2533,7 +2533,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
*/
@Deprecated
public void sendTitle(@Nullable String title, @Nullable String subtitle);
@@ -1464,7 +1753,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1494,7 +1783,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param fadeIn time in ticks for titles to fade in. Defaults to 10.
* @param stay time in ticks for titles to stay. Defaults to 70.
* @param fadeOut time in ticks for titles to fade out. Defaults to 20.
@ -2543,7 +2543,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
/**
@@ -1691,6 +1982,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1721,6 +2012,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public int getClientViewDistance();
@ -2558,7 +2558,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* Gets the player's estimated ping in milliseconds.
*
@@ -1716,8 +2015,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1746,8 +2045,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* they wish.
*
* @return the player's locale
@ -2569,7 +2569,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public String getLocale();
/**
@@ -1769,6 +2070,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1799,6 +2100,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public boolean isAllowingServerListings();
@ -2584,7 +2584,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
// Spigot start
public class Spigot extends Entity.Spigot {
@@ -1800,11 +2109,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1830,11 +2139,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
throw new UnsupportedOperationException("Not supported yet.");
}
@ -2598,7 +2598,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
@Override
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet.");
@@ -1815,7 +2126,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1845,7 +2156,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param component the components to send
@ -2608,7 +2608,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
throw new UnsupportedOperationException("Not supported yet.");
}
@@ -1825,7 +2138,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1855,7 +2168,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param components the components to send
@ -2618,7 +2618,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet.");
}
@@ -1836,7 +2151,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1866,7 +2181,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param position the screen position
* @param sender the sender of the message
* @param component the components to send
@ -2628,7 +2628,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
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.");
}
@@ -1847,7 +2164,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1877,7 +2194,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param position the screen position
* @param sender the sender of the message
* @param components the components to send

View File

@ -3455,10 +3455,10 @@ index 516d7fc7812aac343782861d0d567f54aa578c2a..00000000000000000000000000000000
- // Spigot end
-}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index b7512fa8fa65a2832cd2123ef30b47cd102492cf..55113699efa19a5c222deb0113c9db3dd87ea475 100644
index 84e63caeabe3e44381a464bde47bcadaddba9d43..7303c09e078dad0855c96280174b2760eacc20cd 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2169,7 +2169,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2199,7 +2199,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@Deprecated // Paper
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.");

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 55113699efa19a5c222deb0113c9db3dd87ea475..a1eaa9c7057ec52b3e048b19b6722ef2d727cb84 100644
index 7303c09e078dad0855c96280174b2760eacc20cd..c1affe53a8dc1d1219118610f1f0908c68bb7e51 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2021,6 +2021,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2051,6 +2051,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@Deprecated // Paper
public String getLocale();

View File

@ -75,10 +75,10 @@ index 5357291ff0f2f20bd87ab9f6e57f6a4f6ff65226..887aa6217583d224d66f6d238ac269c2
public class Spigot {
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a1eaa9c7057ec52b3e048b19b6722ef2d727cb84..cb63f5f5c5d273d7bb90a1efb767f846dc1f852b 100644
index c1affe53a8dc1d1219118610f1f0908c68bb7e51..05f0fca8f94da035512bb44aa6f0f99609b8afc6 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2035,6 +2035,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2065,6 +2065,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param affects Whether the player can affect mob spawning
*/
public void setAffectsSpawning(boolean affects);

View File

@ -76,10 +76,10 @@ index c0c67866014940a1331cd714d5c6eb50256ae143..0e63d438a74b96075d7d8fb51ddbd21b
* Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index cb63f5f5c5d273d7bb90a1efb767f846dc1f852b..ffae09c986c0441da82a9cc2c3e19c1104580fc7 100644
index 05f0fca8f94da035512bb44aa6f0f99609b8afc6..f5d419920aa5b83b6c9f680cba6c87646c2be026 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -885,6 +885,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -915,6 +915,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendMap(@NotNull MapView map);

View File

@ -432,10 +432,10 @@ index 0000000000000000000000000000000000000000..9e90c3df567a65b48a0b9341f784eb90
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index ffae09c986c0441da82a9cc2c3e19c1104580fc7..deb0ec4943b6aba373a1b9ec13b0b6a2a56b533a 100644
index f5d419920aa5b83b6c9f680cba6c87646c2be026..28ca7231bfd8b5381b54ea323dfa2c3a972c9700 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -919,6 +919,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -949,6 +949,131 @@ 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);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index deb0ec4943b6aba373a1b9ec13b0b6a2a56b533a..8151222b9b368446dac8088ef80e957aa2d59e82 100644
index 28ca7231bfd8b5381b54ea323dfa2c3a972c9700..d980cc3ed54db4bdf22c73d75d99871f1b16ecb0 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1499,7 +1499,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1529,7 +1529,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the URL is null.
* @throws IllegalArgumentException Thrown if the URL is too long. The
* length restriction is an implementation specific arbitrary value.
@ -18,7 +18,7 @@ index deb0ec4943b6aba373a1b9ec13b0b6a2a56b533a..8151222b9b368446dac8088ef80e957a
public void setResourcePack(@NotNull String url);
/**
@@ -2325,6 +2327,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2355,6 +2357,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.displayName())));
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add String based Action Bar API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 8151222b9b368446dac8088ef80e957aa2d59e82..3979e4287bc3359fa6e10d4bfd2d0007ba072ebb 100644
index d980cc3ed54db4bdf22c73d75d99871f1b16ecb0..5b9480a3d06155c391f1347cb56fde9612d75ed8 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -886,6 +886,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -916,6 +916,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(@NotNull MapView map);
// Paper start
@ -48,7 +48,7 @@ index 8151222b9b368446dac8088ef80e957aa2d59e82..3979e4287bc3359fa6e10d4bfd2d0007
/**
* Sends the component to the player
*
@@ -913,9 +946,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -943,9 +976,11 @@ 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
*

View File

@ -244,10 +244,10 @@ index f8e12868f2e629cdf4784f0157fdb2f8e7b01f99..870ad6cd930653e6248abcc0fce94ffa
* @return Temperature of this block
*/
diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java
index 96dbcc34c87dc3713ece696e8bf65d264faf0236..dd4f394860ef8cabbd4174fe3088eec97aec73a5 100644
index 2e2232956f626669005cfdfd6550aa8ee29fc1ab..869fa47a13fbcb128228963bf53cc72da4499a01 100644
--- a/src/main/java/org/bukkit/block/data/BlockData.java
+++ b/src/main/java/org/bukkit/block/data/BlockData.java
@@ -213,7 +213,7 @@ public interface BlockData extends Cloneable {
@@ -215,7 +215,7 @@ public interface BlockData extends Cloneable {
* {@link Material#REDSTONE_WIRE} -> {@link Material#REDSTONE}
* {@link Material#CARROTS} -> {@link Material#CARROT}
* </pre>
@ -414,10 +414,10 @@ index ae9eaaa8e38e1d9dfc459926c7fc51ddb89de84a..b2ec535bb1b0ce0c114ddd7638b90218
@Override
public int getConversionTime();
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 3979e4287bc3359fa6e10d4bfd2d0007ba072ebb..0e0ee093d023d9f8eeab5e36a90245c76f4a9fe7 100644
index 5b9480a3d06155c391f1347cb56fde9612d75ed8..26236250f4418def6f65c811800063588b43fa84 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -326,15 +326,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -327,15 +327,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Saves the players current location, health, inventory, motion, and
@ -437,7 +437,7 @@ index 3979e4287bc3359fa6e10d4bfd2d0007ba072ebb..0e0ee093d023d9f8eeab5e36a90245c7
* <p>
* Note: This will overwrite the players current inventory, health,
* motion, etc, with the state from the saved dat file.
@@ -569,7 +569,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -570,7 +570,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Plays an effect to just this player.
*
@ -446,7 +446,7 @@ index 3979e4287bc3359fa6e10d4bfd2d0007ba072ebb..0e0ee093d023d9f8eeab5e36a90245c7
* @param loc the location to play the effect at
* @param effect the {@link Effect}
* @param data a data bit needed for some effects
@@ -903,7 +903,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -933,7 +933,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* Use supplied alternative character to the section symbol to represent legacy color codes.
*
@ -455,7 +455,7 @@ index 3979e4287bc3359fa6e10d4bfd2d0007ba072ebb..0e0ee093d023d9f8eeab5e36a90245c7
* @param message The message to send
* @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
*/
@@ -1369,7 +1369,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1399,7 +1399,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Allows this player to see a player that was previously hidden. If
@ -464,7 +464,7 @@ index 3979e4287bc3359fa6e10d4bfd2d0007ba072ebb..0e0ee093d023d9f8eeab5e36a90245c7
* remain hidden until the other plugin calls this method too.
*
* @param plugin Plugin that wants to show the player
@@ -1398,7 +1398,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1428,7 +1428,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Allows this player to see an entity that was previously hidden. If

View File

@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b
+
+}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 0e0ee093d023d9f8eeab5e36a90245c76f4a9fe7..31399c669ca27d72dd3821636ebc01aef615e469 100644
index 26236250f4418def6f65c811800063588b43fa84..bd6881d18d18d03f7e9b7821fa6cc433a79dc17e 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -42,7 +42,7 @@ import org.jetbrains.annotations.Nullable;
@@ -43,7 +43,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a player, connected or not
*/

View File

@ -10,10 +10,10 @@ of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 31399c669ca27d72dd3821636ebc01aef615e469..d487b536b35fec37e7f7e627f750cf27c3bf323c 100644
index bd6881d18d18d03f7e9b7821fa6cc433a79dc17e..b4efaec20a64e6f1955819b0d784d9f671d928e0 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1212,6 +1212,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1242,6 +1242,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void resetPlayerWeather();
@ -29,7 +29,7 @@ index 31399c669ca27d72dd3821636ebc01aef615e469..d487b536b35fec37e7f7e627f750cf27
/**
* Gets the player's cooldown between picking up experience orbs.
*
@@ -1237,8 +1246,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1267,8 +1276,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Gives the player the amount of experience specified.
*
* @param amount Exp amount to give

View File

@ -93,10 +93,10 @@ index 1487b5de4fba5304b7e2105c6f88872923aa7974..e4f8031ab979ba7e3fd7242b788e4197
/**
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d487b536b35fec37e7f7e627f750cf27c3bf323c..c9c2543e5ec85e33173c2000f588940fb41c771e 100644
index b4efaec20a64e6f1955819b0d784d9f671d928e0..7b2d8fd3cb0d44a531bd5d618154059d2a934d48 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2501,6 +2501,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2531,6 +2531,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
*/
boolean hasResourcePack();

View File

@ -36,10 +36,10 @@ index abdca9fe5acc90f167219eb769ece66c35682bb1..b3aa3dc6aa5afbc36cc86741b4cba56f
/**
* Make the entity drop the item in their hand.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index c9c2543e5ec85e33173c2000f588940fb41c771e..1972d7134fb9246e9ed168e0807873a200d75121 100644
index 7b2d8fd3cb0d44a531bd5d618154059d2a934d48..cf7e79eaf1be19f1253761d8e9785b337420f625 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2346,10 +2346,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2376,10 +2376,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Open a Sign for editing by the Player.
*

View File

@ -74,10 +74,10 @@ index b1ded556a1ce4e1d3c873ab9d7f799b6edcc5118..6ab8f05be11f8101202d56bfebc7ec23
/**
* Checks if this player is whitelisted or not
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 1972d7134fb9246e9ed168e0807873a200d75121..d1cd70c1f53bafba9c766200df4ff2873b6f00e5 100644
index cf7e79eaf1be19f1253761d8e9785b337420f625..45633a83af30ed7a18f26911a13bc065a3a027b6 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -886,6 +886,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -916,6 +916,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(@NotNull MapView map);
// Paper start

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Enderman.teleportRandomly()
Ability to trigger the vanilla "teleport randomly" mechanic of an enderman.
diff --git a/src/main/java/org/bukkit/entity/Enderman.java b/src/main/java/org/bukkit/entity/Enderman.java
index bb325d9c802e33431530bbccdcf5de5839e5fe68..821c690f8a32918bdb284ffec4af98f411f76ccc 100644
index 0a03dc437973888ba57ba00fec47193fee38b5a9..605af1a9fc48602643aec57dd14e8c4ab657a0bc 100644
--- a/src/main/java/org/bukkit/entity/Enderman.java
+++ b/src/main/java/org/bukkit/entity/Enderman.java
@@ -10,6 +10,17 @@ import org.jetbrains.annotations.Nullable;
@@ -11,6 +11,17 @@ import org.jetbrains.annotations.Nullable;
*/
public interface Enderman extends Monster {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d1cd70c1f53bafba9c766200df4ff2873b6f00e5..3fae6cc65749ea5129769b0d3006d16134f31e62 100644
index 45633a83af30ed7a18f26911a13bc065a3a027b6..b21834a0ec507d223cdb178b4500981c9e8dc248 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2673,6 +2673,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2703,6 +2703,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param profile The new profile to use
*/
void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile);

View File

@ -346,10 +346,10 @@ index 210f4be510c2074db3938d604937dae0270dd994..59b98f411f62e16fafb0efb489562847
/**
diff --git a/src/main/java/org/bukkit/entity/Enderman.java b/src/main/java/org/bukkit/entity/Enderman.java
index 821c690f8a32918bdb284ffec4af98f411f76ccc..94f3a8c4bf8cf14263d34d866db66728e98dfdb0 100644
index 605af1a9fc48602643aec57dd14e8c4ab657a0bc..b3085c7ff8b3e96083d209f6612c006578773c24 100644
--- a/src/main/java/org/bukkit/entity/Enderman.java
+++ b/src/main/java/org/bukkit/entity/Enderman.java
@@ -25,15 +25,19 @@ public interface Enderman extends Monster {
@@ -26,15 +26,19 @@ public interface Enderman extends Monster {
* Gets the id and data of the block that the Enderman is carrying.
*
* @return MaterialData containing the id and data of the block

View File

@ -229,10 +229,10 @@ index 0000000000000000000000000000000000000000..cf67dc7d465223710adbf2b798109f52
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 3fae6cc65749ea5129769b0d3006d16134f31e62..32499745d6126050ca089e7f3ceb948c95a38eb1 100644
index b21834a0ec507d223cdb178b4500981c9e8dc248..e5781bec16cde82603022e117868be71c2a1faa4 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2693,6 +2693,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2723,6 +2723,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Reset the cooldown counter to 0, effectively starting the cooldown period.
*/
void resetCooldown();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Brand support
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 32499745d6126050ca089e7f3ceb948c95a38eb1..a52b899823f0a98e148d20a04f6b853a649ba50e 100644
index e5781bec16cde82603022e117868be71c2a1faa4..f42bc869ab78abb4f05d36c9a6563c71dfe1ea4f 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2802,6 +2802,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2832,6 +2832,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
// Paper end
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a52b899823f0a98e148d20a04f6b853a649ba50e..6a9e719c39dd7420d181b6c625636ade16f084f4 100644
index f42bc869ab78abb4f05d36c9a6563c71dfe1ea4f..e232de8c09397fd7a539f15e326a8344358a7d2a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2699,6 +2699,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2729,6 +2729,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
@NotNull
<T> T getClientOption(@NotNull com.destroystokyo.paper.ClientOption<T> option);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 6a9e719c39dd7420d181b6c625636ade16f084f4..0c87b9106d4dd1f9e8e7427d22efebc599f0d535 100644
index e232de8c09397fd7a539f15e326a8344358a7d2a..4e8f58d57d0273ef6a9ed75cdf195149dea44df7 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2712,6 +2712,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2742,6 +2742,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
@Nullable
Firework boostElytra(@NotNull ItemStack firework);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerKickEvent causes
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 0c87b9106d4dd1f9e8e7427d22efebc599f0d535..5b01568408cf561b49b2b9a567ba7e9920e66dde 100644
index 4e8f58d57d0273ef6a9ed75cdf195149dea44df7..e897c373406aa0105b1060549469590585d5c78d 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -265,6 +265,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -266,6 +266,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param message kick message
*/
void kick(final net.kyori.adventure.text.@Nullable Component message);

View File

@ -333,13 +333,13 @@ index 191ce6c0e32ab3d05b1376e0fa56d1292c2d442c..8de09075e14a08a6c68f9c24e8960cc0
-public interface Cod extends Fish { }
+public interface Cod extends io.papermc.paper.entity.SchoolableFish { } // Paper - Schooling Fish API
diff --git a/src/main/java/org/bukkit/entity/Enderman.java b/src/main/java/org/bukkit/entity/Enderman.java
index 94f3a8c4bf8cf14263d34d866db66728e98dfdb0..7937a0e082199554d3e8db1f9811be29abc9b3fd 100644
index b3085c7ff8b3e96083d209f6612c006578773c24..b8ad718dbc6bc6e4000480d35c499cc1542998fa 100644
--- a/src/main/java/org/bukkit/entity/Enderman.java
+++ b/src/main/java/org/bukkit/entity/Enderman.java
@@ -54,4 +54,36 @@ public interface Enderman extends Monster {
* @param blockData data to set the carried block to, or null to remove
@@ -89,4 +89,36 @@ public interface Enderman extends Monster {
*/
public void setCarriedBlock(@Nullable BlockData blockData);
@ApiStatus.Experimental
public boolean teleportTowards(@NotNull Entity entity);
+
+ // Paper start
+ /**

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add player health update API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 5b01568408cf561b49b2b9a567ba7e9920e66dde..c726ea381994419b0f2c4d9dfae52bb87dabc732 100644
index e897c373406aa0105b1060549469590585d5c78d..18e098920193438d171ca57e505e20c6c96742ae 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2088,6 +2088,31 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2118,6 +2118,31 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public double getHealthScale();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Multi Block Change API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index c726ea381994419b0f2c4d9dfae52bb87dabc732..084e7031e0a7457e61052f04e2f554d43e4f4d3e 100644
index 18e098920193438d171ca57e505e20c6c96742ae..505fdb8885b05be9fb51acda49530f8bf0e120ff 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -685,6 +685,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -686,6 +686,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendBlockDamage(@NotNull Location loc, float progress);

View File

@ -165,10 +165,10 @@ index ab0ceaba9ddcbe20a8b8a1fc3ed19cb3c64ecd3d..97f0bc6573c8ba09de77061b6312b91c
* Teleports this entity to the given location. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 084e7031e0a7457e61052f04e2f554d43e4f4d3e..d37272b80dc3c1f923cebf387ac35b7ec13ca3cc 100644
index 505fdb8885b05be9fb51acda49530f8bf0e120ff..d2f3114d2fe708553b638010394022d09bde39cf 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2892,6 +2892,49 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2922,6 +2922,49 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
String getClientBrandName();
// Paper end

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d37272b80dc3c1f923cebf387ac35b7ec13ca3cc..e5877f30aa21e1a3d7b9889160b64312e0f87b5c 100644
index d2f3114d2fe708553b638010394022d09bde39cf..104629c89bd4d2a9c086bf2bdbf5dddc7d247660 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2779,6 +2779,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2809,6 +2809,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException If the level is negative or greater than {@code 4} (i.e. not within {@code [0, 4]}).
*/
void sendOpLevel(byte level);

View File

@ -31,13 +31,13 @@ index 921864e748407291b7fa153381e7d9701e1c4608..1c3f54382d66549dc881d4577c7104be
/**
diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java
index dd4f394860ef8cabbd4174fe3088eec97aec73a5..40ddf8909636ab3cdd78f4e66123358c6a3850f7 100644
index 869fa47a13fbcb128228963bf53cc72da4499a01..c6b17605090f2f284e6536567ddf0e0977eeaaf8 100644
--- a/src/main/java/org/bukkit/block/data/BlockData.java
+++ b/src/main/java/org/bukkit/block/data/BlockData.java
@@ -235,4 +235,14 @@ public interface BlockData extends Cloneable {
* @param mirror the mirror
*/
void mirror(@NotNull Mirror mirror);
@@ -247,4 +247,14 @@ public interface BlockData extends Cloneable {
@NotNull
@ApiStatus.Experimental
BlockState createBlockState();
+
+ // Paper start - Tick API
+ /**

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e5877f30aa21e1a3d7b9889160b64312e0f87b5c..7b8b0db8fbff229a880ba32ff75aa87c598b3614 100644
index 104629c89bd4d2a9c086bf2bdbf5dddc7d247660..c0501ab1d6d01b2a8bd8483b3a748858c960eb5c 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2954,6 +2954,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2984,6 +2984,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
void lookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor);
// Paper end - Teleport API

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add Player Warden Warning API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 7b8b0db8fbff229a880ba32ff75aa87c598b3614..d0d6010ea2d215996c7751c051324d9c64c57867 100644
index c0501ab1d6d01b2a8bd8483b3a748858c960eb5c..dbb208e2badea38a4058491650b773192fae80bc 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2970,6 +2970,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3000,6 +3000,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param silent whether sound should be silenced
*/
void showElderGuardian(boolean silent);

View File

@ -98,10 +98,10 @@ index de976be7132d05506fde7a839cac3954b0dd8da4..642feb8b4578e6dbd2bf78d859283d20
public static Instrument getByType(final byte type) {
return BY_DATA.get(type);
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d0d6010ea2d215996c7751c051324d9c64c57867..13fe7e859a947500de2534ec556380d4c62b425f 100644
index dbb208e2badea38a4058491650b773192fae80bc..b11d6e190407b0ab0d9ff25c2c13f04ae907f612 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -406,9 +406,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -407,9 +407,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void playNote(@NotNull Location loc, byte instrument, byte note);
/**

View File

@ -35,10 +35,10 @@ index 3f3ea5bb6b3ea6f55b5cd699f1c01ac159619add..a2a423d4e4c2702ba5967223cab0432d
* Get the category of spawn to which this entity belongs.
*
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 13fe7e859a947500de2534ec556380d4c62b425f..658ecb1942c63e0e4b087501dab23758e9a836cc 100644
index b11d6e190407b0ab0d9ff25c2c13f04ae907f612..14a8831aabe7c7f1803151b382e27c606e7a049f 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -309,6 +309,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -310,6 +310,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @return true if player is in sneak mode
*/
@ -46,7 +46,7 @@ index 13fe7e859a947500de2534ec556380d4c62b425f..658ecb1942c63e0e4b087501dab23758
public boolean isSneaking();
/**
@@ -316,6 +317,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -317,6 +318,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param sneak true if player should appear sneaking
*/

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Flying Fall Damage API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 658ecb1942c63e0e4b087501dab23758e9a836cc..d4b4bc08c420727d4a7f5414ee49bca2970cfed7 100644
index 14a8831aabe7c7f1803151b382e27c606e7a049f..6cebd564b4262ae2145996612bc21e0de5356b84 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1549,6 +1549,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1579,6 +1579,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void setAllowFlight(boolean flight);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Win Screen API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d4b4bc08c420727d4a7f5414ee49bca2970cfed7..4ee0eb177f6b5765a9d7263576bb36c8a8366979 100644
index 6cebd564b4262ae2145996612bc21e0de5356b84..06f00d016f1e46edb8f4fe0c14eb8b364900c3ef 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -916,6 +916,47 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -946,6 +946,47 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendMap(@NotNull MapView map);

View File

@ -2825,35 +2825,37 @@ index 4c62df5a3781ec9df4a5c5f1b528649e6e8a62d1..affd1b8c7589ba59330dc0b6fc803cce
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index f18a05566b8bbb1f481dcee0d2c53ddda68dae9e..a778d53bba0f9678a47ce6c3d94449ae7cd1c527 100644
index f0c08f3a5094e1faaed70ffdc0eb5b6dd16ed500..8b26e90c0e7affb23fe8f92d757fe3a690b858ec 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -211,19 +211,20 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
@@ -211,22 +211,22 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
// CraftBukkit start
Player player = ((ServerPlayer) entityhuman).getBukkitEntity();
- String[] lines = new String[4];
+ List<net.kyori.adventure.text.Component> lines = new java.util.ArrayList<>(); // Paper - adventure
for (int j = 0; j < list.size(); ++j) {
- lines[j] = CraftChatMessage.fromComponent(signtext.getMessage(j, entityhuman.isTextFilteringEnabled()));
+ lines.add(io.papermc.paper.adventure.PaperAdventure.asAdventure(signtext.getMessage(j, entityhuman.isTextFilteringEnabled()))); // Paper - adventure
for (int i = 0; i < list.size(); ++i) {
- lines[i] = CraftChatMessage.fromComponent(signtext.getMessage(i, entityhuman.isTextFilteringEnabled()));
+ lines.add(io.papermc.paper.adventure.PaperAdventure.asAdventure(signtext.getMessage(i, entityhuman.isTextFilteringEnabled()))); // Paper - Adventure
}
SignChangeEvent event = new SignChangeEvent(CraftBlock.at(this.level, this.worldPosition), player, lines, (front) ? Side.FRONT : Side.BACK);
- SignChangeEvent event = new SignChangeEvent(CraftBlock.at(this.level, this.worldPosition), player, lines.clone(), (front) ? Side.FRONT : Side.BACK);
+ SignChangeEvent event = new SignChangeEvent(CraftBlock.at(this.level, this.worldPosition), player, new java.util.ArrayList<>(lines), (front) ? Side.FRONT : Side.BACK); // Paper - Adventure
entityhuman.level().getCraftServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
- Component[] components = org.bukkit.craftbukkit.block.CraftSign.sanitizeLines(event.getLines());
- for (int j = 0; j < components.length; j++) {
- signtext = signtext.setMessage(j, components[j]);
+ // Paper start - adventure
+ for (int j = 0; j < 4; j++) {
+ signtext = signtext.setMessage(j, io.papermc.paper.adventure.PaperAdventure.asVanilla(lines.get(j)));
+ // Paper end - adventure
if (event.isCancelled()) {
return originalText;
}
- Component[] components = org.bukkit.craftbukkit.block.CraftSign.sanitizeLines(event.getLines());
+ Component[] components = org.bukkit.craftbukkit.block.CraftSign.sanitizeLines(event.lines()); // Paper - Adventure
for (int i = 0; i < components.length; i++) {
- if (!Objects.equals(lines[i], event.getLine(i))) {
+ if (!Objects.equals(lines.get(i), event.line(i))) { // Paper - Adventure
signtext = signtext.setMessage(i, components[i]);
}
} else {
signtext = originalText;
}
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
index 614e567eb1ef10ac7514909a8425e29ac3627d3d..60596c4ac2ebb8caf19d65591624275ba63b0199 100644
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
@ -3242,7 +3244,7 @@ index 0beb96dc896f63003e1b1ae458b73902bdbe648a..102eb86bad3000f258775ac06ecd1a6d
public String getCustomName() {
EnchantmentTableBlockEntity enchant = this.getSnapshot();
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
index b22009c0b068f1bc2c59861c4be593ea764248c6..cc6aab5341365f9b4ec3cb23e2a4f5006aa75cd7 100644
index 116c127381fe95825e719f4af8dfdf36d11048e0..8ce466c19dae6534be828779639aedb687a94e68 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
@@ -25,6 +25,23 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
@ -3651,10 +3653,10 @@ index 446fdca49a5a6999626a7ee3a1d5c168b15a09dd..f9863e138994f6c7a7975a852f106faa
public boolean isOp() {
return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed3da27a5f 100644
index 39a6c870c08ae5847dc5859316b1b616b3a0fa5b..41ec9e0adb2a17f8cab4fb1f1735d8b2679f92d0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -282,14 +282,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -286,14 +286,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getDisplayName() {
@ -3694,7 +3696,7 @@ index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed
@Override
public String getPlayerListName() {
return this.getHandle().listName == null ? getName() : CraftChatMessage.fromComponent(this.getHandle().listName);
@@ -308,42 +333,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -312,42 +337,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}
@ -3746,7 +3748,7 @@ index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed
this.getHandle().connection.send(packet);
}
@@ -375,6 +400,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -379,6 +404,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.disconnect(message == null ? "" : message);
}
@ -3770,7 +3772,7 @@ index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed
@Override
public void setCompassTarget(Location loc) {
Preconditions.checkArgument(loc != null, "Location cannot be null");
@@ -669,6 +711,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -673,6 +715,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}
@ -3795,7 +3797,7 @@ index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed
@Override
public void sendSignChange(Location loc, String[] lines) {
this.sendSignChange(loc, lines, DyeColor.BLACK);
@@ -692,6 +752,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -696,6 +756,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return;
Component[] components = CraftSign.sanitizeLines(lines);
@ -3806,10 +3808,10 @@ index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed
+ private void sendSignChange0(Component[] components, Location loc, DyeColor dyeColor, boolean hasGlowingText) {
SignBlockEntity sign = new SignBlockEntity(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
SignText text = sign.getFrontText();
text.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData()));
@@ -700,7 +765,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
text.setMessage(i, components[i]);
text = text.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData()));
@@ -705,7 +770,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
sign.setText(text, true);
- this.getHandle().connection.send(sign.getUpdatePacket());
+ getHandle().connection.send(sign.getUpdatePacket());
@ -3817,7 +3819,7 @@ index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed
}
@Override
@@ -1590,7 +1656,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1606,7 +1672,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setResourcePack(String url) {
@ -3826,7 +3828,7 @@ index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed
}
@Override
@@ -1605,7 +1671,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1621,7 +1687,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setResourcePack(String url, byte[] hash, boolean force) {
@ -3835,7 +3837,7 @@ index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed
}
@Override
@@ -1621,6 +1687,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1637,6 +1703,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}
@ -3857,7 +3859,7 @@ index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed
public void addChannel(String channel) {
Preconditions.checkState(this.channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel);
channel = StandardMessenger.validateAndCorrectChannel(channel);
@@ -2012,6 +2093,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2028,6 +2109,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return (this.getHandle().clientViewDistance == null) ? Bukkit.getViewDistance() : this.getHandle().clientViewDistance;
}
@ -3870,7 +3872,7 @@ index bab41176551656947be4bea4fec3ec82e51146e2..e37f69880c4b439245d7edb4c35418ed
@Override
public int getPing() {
return this.getHandle().latency;
@@ -2062,6 +2149,252 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2078,6 +2165,252 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().allowsListing();
}

View File

@ -1846,10 +1846,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e37f69880c4b439245d7edb4c35418ed3da27a5f..3c6617170c618800940d5826c7e73a3ac7f32e19 100644
index 41ec9e0adb2a17f8cab4fb1f1735d8b2679f92d0..6812237223f8b31e19476cf320192214994c032c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2470,6 +2470,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2486,6 +2486,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
}

View File

@ -22765,10 +22765,10 @@ index 73f61f2b0c0aeefabb7b7bba7ca37914751dcc42..4a3593f24fc844a6a8b1b6c28ad2dc9c
// Spigot start
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3c6617170c618800940d5826c7e73a3ac7f32e19..6894e5b29b4c59cdb46cfd8862709087cb97b923 100644
index 6812237223f8b31e19476cf320192214994c032c..d67a7f9534c3dc43310a26e8e9073c6442a2edef 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -183,6 +183,48 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -187,6 +187,48 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = System.currentTimeMillis();
}

View File

@ -137,10 +137,10 @@ index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75
for(Player player : this.players()) {
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6894e5b29b4c59cdb46cfd8862709087cb97b923..a0e67f97ac0b8bd1419187b61b957cf8f4457f5e 100644
index d67a7f9534c3dc43310a26e8e9073c6442a2edef..050f047641e6c1feb2098fef3ae4c75b1e530bc4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2149,8 +2149,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2165,8 +2165,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {
return this.getHandle().locale;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a0e67f97ac0b8bd1419187b61b957cf8f4457f5e..9423535cc7828e4f5286214ceffe3c481a922d9e 100644
index 050f047641e6c1feb2098fef3ae4c75b1e530bc4..17b4ec27f2420b03289aebc7826e365f7c735b45 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1831,12 +1831,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1847,12 +1847,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setFlying(boolean value) {

View File

@ -30,10 +30,10 @@ index 1ef48b8415242942f00c6a76faa1de2865e11358..bcf0d4cfbfbae254bc74ad6389af372a
this.locale = packet.language;
// Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9423535cc7828e4f5286214ceffe3c481a922d9e..e67b8e85ae8ad7aba8eabcbcbef0b59b2837e60a 100644
index 17b4ec27f2420b03289aebc7826e365f7c735b45..79bc5ab586235024bc95d7ca7636660330ccdc66 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2149,8 +2149,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2165,8 +2165,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {

View File

@ -107,10 +107,10 @@ index 9da9b5b4b92996240cc93be2db82bf3a931e76c1..c84e32f53783b2e00b829ce839894c0a
return true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e67b8e85ae8ad7aba8eabcbcbef0b59b2837e60a..3290e6197e60ed2e9a667ce22a14127bc1ba3f97 100644
index 79bc5ab586235024bc95d7ca7636660330ccdc66..d07fd2936adaae3b6f95cbb8bc746362633c2896 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -480,7 +480,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -484,7 +484,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return;

View File

@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3290e6197e60ed2e9a667ce22a14127bc1ba3f97..0d8337e5b591cd4d7ba946f01990d7c562bba72a 100644
index d07fd2936adaae3b6f95cbb8bc746362633c2896..730921dec26bdaff69f485bd57a5aeaddcfca34e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@
@ -73,7 +73,7 @@ index 3290e6197e60ed2e9a667ce22a14127bc1ba3f97..0d8337e5b591cd4d7ba946f01990d7c5
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding;
@@ -322,6 +323,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -326,6 +327,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}

View File

@ -16,10 +16,10 @@ The wanted destination was on top of the emerald block however the player ended
This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0d8337e5b591cd4d7ba946f01990d7c562bba72a..5b7ac9efd45009142dd5da6987e2e9dad5cbba7f 100644
index 730921dec26bdaff69f485bd57a5aeaddcfca34e..94e191642189c5af87a4dae7942d2f4535240e96 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1136,7 +1136,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1152,7 +1152,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entity.connection.teleport(to);
} else {
// The respawn reason should never be used if the passed location is non null.

View File

@ -23,10 +23,10 @@ index 95d84f9a524ef0705875987c3781a0d73189dfbb..e60d8689e7bec90cb4b8787ff252eb7d
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5b7ac9efd45009142dd5da6987e2e9dad5cbba7f..c1ad517b8925ee19b3e251a45816e8a7ecc5e3b8 100644
index 94e191642189c5af87a4dae7942d2f4535240e96..cc62d67e60f5f6ee313d4e20a6f206fec8545df1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -177,6 +177,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -181,6 +181,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private double healthScale = 20;
private CraftWorldBorder clientWorldBorder = null;
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
@ -37,7 +37,7 @@ index 5b7ac9efd45009142dd5da6987e2e9dad5cbba7f..c1ad517b8925ee19b3e251a45816e8a7
public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity);
@@ -2272,6 +2276,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2288,6 +2292,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public boolean getAffectsSpawning() {
return this.getHandle().affectsSpawning;
}

View File

@ -44,10 +44,10 @@ index 1238da8b035a0b0dd3d00557ca0de7a82f5fdf53..5e40ee2695b7ed50fddc0e8226f0b1b4
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c1ad517b8925ee19b3e251a45816e8a7ecc5e3b8..10a42c5c69ea99bc90d08b51bc9f342504d1da7d 100644
index cc62d67e60f5f6ee313d4e20a6f206fec8545df1..ae9467c7de52d9214443f36540d3069c67e98441 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2076,6 +2076,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2092,6 +2092,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setRealHealth(double health) {

View File

@ -26,10 +26,10 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 10a42c5c69ea99bc90d08b51bc9f342504d1da7d..79d061d07569207fde3bb4b959589ba3f0cba981 100644
index ae9467c7de52d9214443f36540d3069c67e98441..e63528f7e089515ee5db399142489d1d364e9d9b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -328,6 +328,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -332,6 +332,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper start

View File

@ -90,10 +90,10 @@ index 77d7f070cce1a47e41b5d4f5a1cc8c778352a126..a3b610cb1ed97a635677bc46ccdf0463
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 79d061d07569207fde3bb4b959589ba3f0cba981..55a934e2fc4facd47eede4c95fe76a61105e7582 100644
index e63528f7e089515ee5db399142489d1d364e9d9b..c46c8a2203c7f54da54ae5d066dc3d25f993560a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -274,6 +274,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -278,6 +278,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}

View File

@ -69,10 +69,10 @@ index e5750b2459e5a7513b34d644f672f3e06181172d..3205d86a63f8fcf3ccd13c6be0e0eefc
public Biome getBiome() {
return this.getWorld().getBiome(this.getX(), this.getY(), this.getZ());
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index 7629a51ec284cab0db7e9238027d6acfa4f3083c..a76cce199acdcecfdd8b998ec08974c2ed0751cf 100644
index f698424feb30a8579e2ca581c48be08edf5bbf59..84550b6e4eaf62806a8ad83656d4051b09c9c97d 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -10,15 +10,26 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
@@ -17,15 +17,26 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
private final T tileEntity;
private final T snapshot;
@ -101,9 +101,9 @@ index 7629a51ec284cab0db7e9238027d6acfa4f3083c..a76cce199acdcecfdd8b998ec08974c2
}
public void refreshSnapshot() {
@@ -105,4 +116,11 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
public PersistentDataContainer getPersistentDataContainer() {
return this.getSnapshot().persistentDataContainer;
@@ -118,4 +129,11 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
T vanillaTileEntitiy = (T) BlockEntity.loadStatic(CraftLocation.toBlockPosition(location), getHandle(), this.getSnapshotNBT());
return ClientboundBlockEntityDataPacket.create(vanillaTileEntitiy);
}
+
+ // Paper start

View File

@ -14,10 +14,10 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 55a934e2fc4facd47eede4c95fe76a61105e7582..77e5c017cef9809bf60c5aa77b245d76a1982a9f 100644
index c46c8a2203c7f54da54ae5d066dc3d25f993560a..1dee499c843f4e434fd7881881955fa33b880aef 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1460,7 +1460,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1476,7 +1476,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override

View File

@ -55,10 +55,10 @@ index e7442952ef1f03969949014492a7ddc6d0796ba5..69a1852905dd4724c30ac8ab88c14251
public Server getServer() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 77e5c017cef9809bf60c5aa77b245d76a1982a9f..a8930679d566fcbd0557b3023248ded393754c8d 100644
index 1dee499c843f4e434fd7881881955fa33b880aef..bf6acb00eb347ae8d746fb8e7231ae766069d0d2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -82,6 +82,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes;
@@ -83,6 +83,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.level.GameType;
import net.minecraft.world.level.block.Blocks;
@ -66,7 +66,7 @@ index 77e5c017cef9809bf60c5aa77b245d76a1982a9f..a8930679d566fcbd0557b3023248ded3
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.block.entity.SignText;
import net.minecraft.world.level.border.BorderChangeListener;
@@ -257,11 +258,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -261,11 +262,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return server.getPlayer(getUniqueId()) != null;
}
@ -78,7 +78,7 @@ index 77e5c017cef9809bf60c5aa77b245d76a1982a9f..a8930679d566fcbd0557b3023248ded3
@Override
public InetSocketAddress getAddress() {
if (this.getHandle().connection == null) return null;
@@ -1610,8 +1606,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1626,8 +1622,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private void untrackAndHideEntity(org.bukkit.entity.Entity entity) {
// Remove this entity from the hidden player's EntityTrackerEntry
@ -95,7 +95,7 @@ index 77e5c017cef9809bf60c5aa77b245d76a1982a9f..a8930679d566fcbd0557b3023248ded3
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
if (entry != null) {
entry.removePlayer(this.getHandle());
@@ -1624,8 +1627,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1640,8 +1643,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID())));
}
}
@ -104,7 +104,7 @@ index 77e5c017cef9809bf60c5aa77b245d76a1982a9f..a8930679d566fcbd0557b3023248ded3
}
void resetAndHideEntity(org.bukkit.entity.Entity entity) {
@@ -1702,8 +1703,38 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1718,8 +1719,38 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (entry != null && !entry.seenBy.contains(this.getHandle().connection)) {
entry.updatePlayer(this.getHandle());
}
@ -144,7 +144,7 @@ index 77e5c017cef9809bf60c5aa77b245d76a1982a9f..a8930679d566fcbd0557b3023248ded3
}
void resetAndShowEntity(org.bukkit.entity.Entity entity) {
@@ -1716,6 +1747,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1732,6 +1763,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.trackAndShowEntity(entity);
}
}

View File

@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a8930679d566fcbd0557b3023248ded393754c8d..62d04140dec79c108e38754e69b60ecaf36dc3c5 100644
index bf6acb00eb347ae8d746fb8e7231ae766069d0d2..70b499e4c6d50cb55219033fd67356295239316a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -181,6 +181,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -185,6 +185,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
@ -20,7 +20,7 @@ index a8930679d566fcbd0557b3023248ded393754c8d..62d04140dec79c108e38754e69b60eca
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1985,7 +1986,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2001,7 +2002,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
public void addChannel(String channel) {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Enderman.teleportRandomly()
Ability to trigger the vanilla "teleport randomly" mechanic of an enderman.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
index b72d7ade10075a13a617a370e2b8021326c9478d..ae669a970aa1f17ed786640de8a481364543c58e 100644
index 3121e0cef159493d6282e53d3a4ee3e4288ce5e1..fe829a74e23442c93bb5565589e8f33300ea01e1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
@@ -16,6 +16,7 @@ public class CraftEnderman extends CraftMonster implements Enderman {
@@ -18,6 +18,7 @@ public class CraftEnderman extends CraftMonster implements Enderman {
super(server, entity);
}

View File

@ -173,10 +173,10 @@ index f59733b6918dcbbb2190f76d8b8841a2d8818cdf..ba6105a970381d642cd7955754cc4713
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 62d04140dec79c108e38754e69b60ecaf36dc3c5..42a1592e6f5a0d60718cb1f8682025bc4be48708 100644
index 70b499e4c6d50cb55219033fd67356295239316a..dceea046eb4becbfa7be8bd91459f7aabea27914 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1166,7 +1166,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1182,7 +1182,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Close any foreign inventory
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {

View File

@ -26,23 +26,23 @@ index 803f3ebaa9fe43c88f461168ee43fc6ba920a764..2451bb61e304fbe5cdfd6bbb248575e9
private boolean calculateSolid() {
if (((Block) this.owner).properties.forceSolidOn) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index 3ebdd30d0090f744b09bd1ecab95c294f4dfd989..12ea3a50126cd324dd3ee25a0f6c17deb05bd3a1 100644
index 745d2c589df8c59db327d7482024096473318812..c80aaa37b7d63acfb283641a4804dc2a32156eda 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -558,7 +558,17 @@ public class CraftBlockData implements BlockData {
@@ -560,7 +560,17 @@ public class CraftBlockData implements BlockData {
return craft;
}
+ // Paper start - optimize creating BlockData to not need a map lookup
+ static {
+ // Initialize cached data for all IBlockData instances after registration
+ Block.BLOCK_STATE_REGISTRY.iterator().forEachRemaining(BlockState::createCraftBlockData);
+ Block.BLOCK_STATE_REGISTRY.iterator().forEachRemaining(net.minecraft.world.level.block.state.BlockState::createCraftBlockData);
+ }
public static CraftBlockData fromData(BlockState data) {
public static CraftBlockData fromData(net.minecraft.world.level.block.state.BlockState data) {
+ return data.createCraftBlockData();
+ }
+
+ public static CraftBlockData createData(BlockState data) {
+ public static CraftBlockData createData(net.minecraft.world.level.block.state.BlockState data) {
+ // Paper end
return CraftBlockData.MAP.getOrDefault(data.getBlock().getClass(), CraftBlockData::new).apply(data);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 42a1592e6f5a0d60718cb1f8682025bc4be48708..42c0012633f25b432ba2df0db412287bd00a5f5b 100644
index dceea046eb4becbfa7be8bd91459f7aabea27914..91b858ef2ef063b5f91dc017836d37e19b329101 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2732,6 +2732,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2748,6 +2748,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.adventure$pointers;
}

View File

@ -357,10 +357,10 @@ index 719f68f96e58ddcdd3592131c691d21263c81915..4413b609f1250cf9477fcb3fecd7b67a
this.gameEvent(GameEvent.ENTITY_DIE);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 42c0012633f25b432ba2df0db412287bd00a5f5b..cce52883b3ddb9bbf007ed701b291ee548225339 100644
index 91b858ef2ef063b5f91dc017836d37e19b329101..e572dbdbd02e6b7307172e0b6f80d9b6e7fbce60 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2232,7 +2232,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2248,7 +2248,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void sendHealthUpdate() {

View File

@ -106,10 +106,10 @@ index 69a1852905dd4724c30ac8ab88c14251eee2c371..17b3d5de58a9ef3acc67624c46cd6bbd
public Location getLastDeathLocation() {
if (this.getData().contains("LastDeathLocation", 10)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index cce52883b3ddb9bbf007ed701b291ee548225339..dc71264669366dd4e08792f827287467dfcb63f6 100644
index e572dbdbd02e6b7307172e0b6f80d9b6e7fbce60..25e8d025c3542cdb08a9228dc5fb2d1944d51701 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -182,6 +182,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -186,6 +186,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit
@ -117,7 +117,7 @@ index cce52883b3ddb9bbf007ed701b291ee548225339..dc71264669366dd4e08792f827287467
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1857,6 +1858,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1873,6 +1874,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = firstPlayed;
}
@ -136,7 +136,7 @@ index cce52883b3ddb9bbf007ed701b291ee548225339..dc71264669366dd4e08792f827287467
public void readExtraData(CompoundTag nbttagcompound) {
this.hasPlayedBefore = true;
if (nbttagcompound.contains("bukkit")) {
@@ -1879,6 +1892,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1895,6 +1908,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setExtraData(CompoundTag nbttagcompound) {
@ -145,7 +145,7 @@ index cce52883b3ddb9bbf007ed701b291ee548225339..dc71264669366dd4e08792f827287467
if (!nbttagcompound.contains("bukkit")) {
nbttagcompound.put("bukkit", new CompoundTag());
}
@@ -1893,6 +1908,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1909,6 +1924,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
data.putLong("firstPlayed", this.getFirstPlayed());
data.putLong("lastPlayed", System.currentTimeMillis());
data.putString("lastKnownName", handle.getScoreboardName());

View File

@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index dc71264669366dd4e08792f827287467dfcb63f6..dd99a5ad2212fb228e766a0e0a90a68a3f4b515e 100644
index 25e8d025c3542cdb08a9228dc5fb2d1944d51701..38786153c9e9dc86992ba1b9a8226042aaf7e845 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2779,6 +2779,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2795,6 +2795,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetCooldown() {
getHandle().resetAttackStrengthTicker();
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Show blockstate location if we failed to read it
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index a76cce199acdcecfdd8b998ec08974c2ed0751cf..87c25170fbe8b0591d452612496ee1a627138de7 100644
index 84550b6e4eaf62806a8ad83656d4051b09c9c97d..fbf2c487d7ea0e6530ab664ba706cbcf81fc60a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -18,6 +18,7 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
@@ -25,6 +25,7 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
this.tileEntity = tileEntity;
@ -16,7 +16,7 @@ index a76cce199acdcecfdd8b998ec08974c2ed0751cf..87c25170fbe8b0591d452612496ee1a6
// Paper start
this.snapshotDisabled = DISABLE_SNAPSHOT;
if (DISABLE_SNAPSHOT) {
@@ -30,6 +31,14 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
@@ -37,6 +38,14 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
this.load(this.snapshot);
}
// Paper end

View File

@ -116,10 +116,10 @@ index 65d17836785774d0f196321ba741ffd05a9db36e..fd34a2ace2efc819b06674ceab44ff78
if (getMainArm() != packet.mainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index dd99a5ad2212fb228e766a0e0a90a68a3f4b515e..ef2476afc452c83be28c97d9860e27368ded5254 100644
index 38786153c9e9dc86992ba1b9a8226042aaf7e845..97e19221920e2ba26432a0d6d78aceff48f8e082 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -591,6 +591,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -595,6 +595,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
}
}

View File

@ -56,10 +56,10 @@ index a7429a2efb6100033552d5bf2d7731d1d5c6c7df..5fb375ac652029441147ffefd3305683
return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ef2476afc452c83be28c97d9860e27368ded5254..9cfd26baef0fa878e8e0420750cd512bdff12ac5 100644
index 97e19221920e2ba26432a0d6d78aceff48f8e082..7eb629519f1604d76a20c9ac468b8e2697980de4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2896,6 +2896,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2912,6 +2912,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
};

View File

@ -17,10 +17,10 @@ index 56e98ea2964c2779537ac607b7c4677bc695d92a..0ed8add0a2acec7d109f9687b7d77967
if (this.isSameThread()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index 12ea3a50126cd324dd3ee25a0f6c17deb05bd3a1..cd40c4c86b1f5de37fea9c0cd71b2e7b30b9136f 100644
index c80aaa37b7d63acfb283641a4804dc2a32156eda..68dc8455427b6e3f60a4472db3a625028c413561 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -525,9 +525,39 @@ public class CraftBlockData implements BlockData {
@@ -527,9 +527,39 @@ public class CraftBlockData implements BlockData {
Preconditions.checkState(CraftBlockData.MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit);
}
@ -57,6 +57,6 @@ index 12ea3a50126cd324dd3ee25a0f6c17deb05bd3a1..cd40c4c86b1f5de37fea9c0cd71b2e7b
+
+ private static CraftBlockData createNewData(Material material, String data) {
+ // Paper end - cache block data strings
BlockState blockData;
net.minecraft.world.level.block.state.BlockState blockData;
Block block = CraftMagicNumbers.getBlock(material);
Map<Property<?>, Comparable<?>> parsed = null;

View File

@ -67,10 +67,10 @@ index 2773f47d4e7a9432ab1ccebfcdc22317ef762099..b722a207c0e745bb172d93b90e1241d7
public void setFlag(int flag) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index cd40c4c86b1f5de37fea9c0cd71b2e7b30b9136f..58d10e8909fea652810e30bbd4b24aaa5e038277 100644
index 68dc8455427b6e3f60a4472db3a625028c413561..68ffdb2140bdf8d00ed86db19d316735d9a6b2d1 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -57,7 +57,7 @@ public class CraftBlockData implements BlockData {
@@ -59,7 +59,7 @@ public class CraftBlockData implements BlockData {
@Override
public Material getMaterial() {
@ -78,7 +78,7 @@ index cd40c4c86b1f5de37fea9c0cd71b2e7b30b9136f..58d10e8909fea652810e30bbd4b24aaa
+ return this.state.getBukkitMaterial(); // Paper - optimise getType calls
}
public BlockState getState() {
public net.minecraft.world.level.block.state.BlockState getState() {
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
index 79b6f88a32ea5eaf77757b8cc3824b6dac1558a7..7bfb9bc9689c5d9899b572862f3fbe53812f36b1 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9cfd26baef0fa878e8e0420750cd512bdff12ac5..18a2ea9b00257de057c326f6a350b9ab281ab696 100644
index 7eb629519f1604d76a20c9ac468b8e2697980de4..c67161842ad149cd0958520d9528fbedf42e3fe1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -613,6 +613,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -617,6 +617,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
throw new RuntimeException("Unknown settings type");
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 18a2ea9b00257de057c326f6a350b9ab281ab696..0ecd7b1bad69ab74f44effd4e4d552b3a5ba7e0a 100644
index c67161842ad149cd0958520d9528fbedf42e3fe1..e163daf31a1e3318f9127920e5ef0d36af2f6664 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2425,7 +2425,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2441,7 +2441,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (data != null) {
Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
}

View File

@ -32,10 +32,10 @@ index 13e2fb9e48ed8722b68b2ce2994d9d84bb22cee4..600bb44d97b477960108ea8cd84a8e73
public boolean isWhiteListed(GameProfile profile) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0ecd7b1bad69ab74f44effd4e4d552b3a5ba7e0a..950fa366d269bc4aca459c5f296ecf578f8ce312 100644
index e163daf31a1e3318f9127920e5ef0d36af2f6664..0906de2fb92cbdcc47ed1b2393430a7ac33ae920 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -627,6 +627,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -631,6 +631,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
? (org.bukkit.entity.Firework) entity.getBukkitEntity()
: null;
}

View File

@ -144,10 +144,10 @@ index 84c49a70c32c07580748d9a55f24902ce5be8c5b..582697f5bb1423ee5eae91d28b19c108
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 950fa366d269bc4aca459c5f296ecf578f8ce312..949ef08cb2fbc6b237c651734821cc88e9fa1d9a 100644
index 0906de2fb92cbdcc47ed1b2393430a7ac33ae920..eab8e34a3768b380e6c171080adc8d22c6f4f85b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1485,7 +1485,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1501,7 +1501,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Preconditions.checkArgument(mode != null, "GameMode cannot be null");
if (this.getHandle().connection == null) return;

View File

@ -491,10 +491,10 @@ index 984c288abf94d9fe47fada33722fea035b832f3b..addd20237b87c9a87bb09fd7addb101a
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 949ef08cb2fbc6b237c651734821cc88e9fa1d9a..02e8f2ca5d97df0b1c845e10261a4bc70da755a4 100644
index eab8e34a3768b380e6c171080adc8d22c6f4f85b..c11ca0b9601ef90f19f61cce029cafcfac3c1619 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -573,7 +573,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -577,7 +577,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot
if (this.getHandle().connection == null) return;
@ -503,7 +503,7 @@ index 949ef08cb2fbc6b237c651734821cc88e9fa1d9a..02e8f2ca5d97df0b1c845e10261a4bc7
}
// Paper start
@@ -585,10 +585,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -589,10 +589,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void kick(final net.kyori.adventure.text.Component message) {
@ -520,7 +520,7 @@ index 949ef08cb2fbc6b237c651734821cc88e9fa1d9a..02e8f2ca5d97df0b1c845e10261a4bc7
}
}
@@ -659,7 +664,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -663,7 +668,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start - improve chat handling
if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) {

View File

@ -579,10 +579,10 @@ index fb4b3d30eded561f526dbd2daa74e49149eb55ac..801ed8241cad4ac890a6d99cd19a3dd7
public CraftCod(CraftServer server, net.minecraft.world.entity.animal.Cod entity) {
super(server, entity);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
index ae669a970aa1f17ed786640de8a481364543c58e..acdc4e578d70f8121c8c6be7682ba1ecef7687cf 100644
index fe829a74e23442c93bb5565589e8f33300ea01e1..57704564acc11ea688026aad8be4e612e36803ff 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
@@ -39,6 +39,28 @@ public class CraftEnderman extends CraftMonster implements Enderman {
@@ -41,6 +41,28 @@ public class CraftEnderman extends CraftMonster implements Enderman {
this.getHandle().setCarriedBlock(blockData == null ? null : ((CraftBlockData) blockData).getState());
}

View File

@ -58,10 +58,10 @@ index 0000000000000000000000000000000000000000..01a2bc1feec808790bb93618ce46adb9
+ }
+}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index 4fe156701cf0664d0ab9472f5599fd87ee4ddeb2..ba6f0ba00cd2635bcd19889dca0349b363b079fe 100644
index 4b9d326458fb3029f19e58b77ef0156b26b9c88b..0521240dddde12d78cc05deda7fac11690f5d155 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -274,7 +274,17 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
@@ -275,7 +275,17 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
ClickEvent chatclickable = chatmodifier.getClickEvent();
if (chatclickable != null && chatclickable.getAction() == ClickEvent.Action.RUN_COMMAND) {
@ -80,7 +80,7 @@ index 4fe156701cf0664d0ab9472f5599fd87ee4ddeb2..ba6f0ba00cd2635bcd19889dca0349b3
flag1 = true;
}
}
@@ -311,8 +321,23 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
@@ -312,8 +322,23 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
String s = player == null ? "Sign" : player.getName().getString();
Object object = player == null ? Component.literal("Sign") : player.getDisplayName();

View File

@ -187,10 +187,10 @@ index 1a27b7faa22e6b3dc5fce329ed06425de56c4315..b9903c29bdea8d1e3b6fce0e97be6bd9
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 02e8f2ca5d97df0b1c845e10261a4bc70da755a4..8ecfb50b3c999078d7276fbee34fadd3af60fe45 100644
index c11ca0b9601ef90f19f61cce029cafcfac3c1619..736b97517906f154158618ad92328ad34ab1882d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1298,9 +1298,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1314,9 +1314,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setBedSpawnLocation(Location location, boolean override) {
if (location == null) {

View File

@ -26,12 +26,12 @@ index d156f7cc71050f13b2feca00c52ca6b64572b60e..e3557f4c8cee7c88b3e352cd246078da
if (state instanceof InventoryHolder) return (InventoryHolder) state;
return null;
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index 87c25170fbe8b0591d452612496ee1a627138de7..a2894f02ceb7c58f6eafe055e1ff47b197b100f2 100644
index fbf2c487d7ea0e6530ab664ba706cbcf81fc60a3..e30d5235c89a23b31ef259a480e23aa07d959a4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -6,7 +6,7 @@ import org.bukkit.World;
import org.bukkit.block.TileState;
import org.bukkit.persistence.PersistentDataContainer;
@@ -13,7 +13,7 @@ import org.bukkit.persistence.PersistentDataContainer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockState implements TileState {
+public abstract class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockState implements TileState { // Paper - revert upstream's revert of the block state changes

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add player health update API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8ecfb50b3c999078d7276fbee34fadd3af60fe45..df99f0c91cc3bc79ca7e5db27c2e4d215da30a55 100644
index 736b97517906f154158618ad92328ad34ab1882d..8406901601abbfda9d39482bed0a17f1ebc701b1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2304,9 +2304,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2320,9 +2320,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().maxHealthCache = getMaxHealth();
}
@ -22,7 +22,7 @@ index 8ecfb50b3c999078d7276fbee34fadd3af60fe45..df99f0c91cc3bc79ca7e5db27c2e4d21
if (this.getHandle().queueHealthUpdatePacket) {
this.getHandle().queuedHealthUpdatePacket = packet;
} else {
@@ -2315,6 +2317,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2331,6 +2333,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
}

View File

@ -24,10 +24,10 @@ index f96d61bdeb556665d6e6e5023f9d77fd82204e89..e3f355c85eb7cc8c1683e3009502c10a
public void write(FriendlyByteBuf buf) {
buf.writeLong(this.sectionPos.asLong());
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index df99f0c91cc3bc79ca7e5db27c2e4d215da30a55..c949a3581581aa34a678d942fe38e660ba389eef 100644
index 8406901601abbfda9d39482bed0a17f1ebc701b1..3120f72d2ba93625931da83c1e37678c07bd69cd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -878,6 +878,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -882,6 +882,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}

View File

@ -74,10 +74,10 @@ index cc72d960d9a5f9481ec2214b1549a344907a68da..94b41e9e3abe9cfbe09af67b03bc841f
// Let the server handle cross world teleports
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c949a3581581aa34a678d942fe38e660ba389eef..607c5797ee9d4c62ff5fbf1613d2ac08ec57d067 100644
index 3120f72d2ba93625931da83c1e37678c07bd69cd..65e0a7e7b210107cd8882cc48da796c470b6eec4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1187,13 +1187,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1203,13 +1203,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setRotation(float yaw, float pitch) {
@ -180,7 +180,7 @@ index c949a3581581aa34a678d942fe38e660ba389eef..607c5797ee9d4c62ff5fbf1613d2ac08
location.checkFinite();
ServerPlayer entity = this.getHandle();
@@ -1206,7 +1294,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1222,7 +1310,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return false;
}
@ -189,7 +189,7 @@ index c949a3581581aa34a678d942fe38e660ba389eef..607c5797ee9d4c62ff5fbf1613d2ac08
return false;
}
@@ -1224,7 +1312,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1240,7 +1328,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// If this player is riding another entity, we must dismount before teleporting.
@ -198,7 +198,7 @@ index c949a3581581aa34a678d942fe38e660ba389eef..607c5797ee9d4c62ff5fbf1613d2ac08
// SPIGOT-5509: Wakeup, similar to riding
if (this.isSleeping()) {
@@ -1240,13 +1328,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1256,13 +1344,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle();
// Close any foreign inventory

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 607c5797ee9d4c62ff5fbf1613d2ac08ec57d067..b52159c9adf1f502cb357e920da3128ab3592861 100644
index 65e0a7e7b210107cd8882cc48da796c470b6eec4..8369fa30d713e9917473d9d6caf4ebc4e3aad228 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -639,6 +639,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -643,6 +643,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false);
}

View File

@ -31,12 +31,12 @@ index c04397cc60154ef55027c90be990b9dfb818fd2f..5401ab9f8f6ce12e1c5368dbc3acc78a
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index 58d10e8909fea652810e30bbd4b24aaa5e038277..85c2e7f8399788caa4c7dfed4f8b1104a546fc21 100644
index 68ffdb2140bdf8d00ed86db19d316735d9a6b2d1..78dc524549be9373a04df905deab85d41e7f7870 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -680,4 +680,11 @@ public class CraftBlockData implements BlockData {
public void mirror(Mirror mirror) {
this.state = this.state.mirror(net.minecraft.world.level.block.Mirror.valueOf(mirror.name()));
@@ -688,4 +688,11 @@ public class CraftBlockData implements BlockData {
public BlockState createBlockState() {
return CraftBlockStates.getBlockState(this.state, null);
}
+
+ // Paper start - Block tick API

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b52159c9adf1f502cb357e920da3128ab3592861..16f7ec3dc9ce1ba14205d3ddd2062aaeea7b67e9 100644
index 8369fa30d713e9917473d9d6caf4ebc4e3aad228..3975546e58ae69d5d9f662a446d0d68a731f45dc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3067,6 +3067,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3083,6 +3083,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end

View File

@ -10,10 +10,10 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 16f7ec3dc9ce1ba14205d3ddd2062aaeea7b67e9..cb1811f7283f5d41dda771998f029058c9417729 100644
index 3975546e58ae69d5d9f662a446d0d68a731f45dc..627872976ae4c01f3e87b210ed745622e72c8552 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3072,6 +3072,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3088,6 +3088,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void showElderGuardian(boolean silent) {
if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F));
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] fix Instruments
properly handle Player#playNote
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index cb1811f7283f5d41dda771998f029058c9417729..5d93b34e49891a3f93c0d83307ba14f196e72cc6 100644
index 627872976ae4c01f3e87b210ed745622e72c8552..50036389960681b429836b28e608f512c104a888 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -713,29 +713,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -717,29 +717,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return;

View File

@ -26,10 +26,10 @@ index 53487f0a4fe672298c3b83d24a2a603641afcde8..58152160d609d0e9d105153aeb166a56
} else {
if (fallDistance >= 2.0F) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5d93b34e49891a3f93c0d83307ba14f196e72cc6..fd0cd21ce5bd2c8f255fa53e1788548b41d168cc 100644
index 50036389960681b429836b28e608f512c104a888..01d1878e1ce2338717e77ab729ed481fd5ff7252 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2288,6 +2288,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2304,6 +2304,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().onUpdateAbilities();
}

View File

@ -7,10 +7,10 @@ Subject: [PATCH] Win Screen API
public net.minecraft.server.level.ServerPlayer seenCredits
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index fd0cd21ce5bd2c8f255fa53e1788548b41d168cc..fd72e7ccc7efe86e3c75252b50032751c4cb3f2c 100644
index 01d1878e1ce2338717e77ab729ed481fd5ff7252..19dfcb53fea04b13593adee4987eaa589546703d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1190,6 +1190,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1206,6 +1206,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}

View File

@ -33,10 +33,10 @@ index 8d8fe55a05eea237a8af99ed15ab16d6167daa77..eca634792d2a7cc649675e3394e84dba
return k > 0 ? this.repairPlayerItems(player, k) : 0;
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index fd72e7ccc7efe86e3c75252b50032751c4cb3f2c..c8ceaf9ba8e167db0138bbad134100d8717a326e 100644
index 19dfcb53fea04b13593adee4987eaa589546703d..87e939222353de48b796d546a09ed4516bd011a7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1658,11 +1658,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1674,11 +1674,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ());
int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue());

View File

@ -5,14 +5,14 @@ Subject: [PATCH] Fix spigot sound playing for BlockItem ItemStacks
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 103ad5f373a59fadb4783892579f3e681a8fd596..adb7220be617d6d9f2cdd7fbe4fa2dd24cc7d142 100644
index 414167d5390baea98a9876ee4ea368c8eeee2f9f..adb7220be617d6d9f2cdd7fbe4fa2dd24cc7d142 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -513,7 +513,11 @@ public final class ItemStack {
// SPIGOT-1288 - play sound stripped from ItemBlock
if (this.item instanceof BlockItem) {
- SoundType soundeffecttype = ((BlockItem) this.item).getBlock().getSoundType(null);
- SoundType soundeffecttype = ((BlockItem) this.item).getBlock().defaultBlockState().getSoundType(); // TODO: not strictly correct, however currently only affects decorated pots
+ // Paper start
+ BlockPos position = new net.minecraft.world.item.context.BlockPlaceContext(itemactioncontext).getClickedPos();
+ net.minecraft.world.level.block.state.BlockState blockData = world.getBlockState(position);

View File

@ -1,36 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Bjarne Koll <lynxplay101@gmail.com>
Date: Sun, 11 Jun 2023 18:45:10 +0200
Subject: [PATCH] Fix sendSignChange0's usage of SignText
Minecraft 1.20 introduced the SignText class that holds onto the text of
a single side of a minecraft sign.
This type is immutable and any methods on it produce an updated, new
instance of the class rather than mutating the called upon instance.
Spigot does not respect this change as it does not re-assign the
constructed sign text to the instance nor does it feed back said
instance to the virtual sign block entity.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c8ceaf9ba8e167db0138bbad134100d8717a326e..03bb444705916ffe0b9eb4b7496524dc3459ebe0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1027,11 +1027,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private void sendSignChange0(Component[] components, Location loc, DyeColor dyeColor, boolean hasGlowingText) {
SignBlockEntity sign = new SignBlockEntity(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
SignText text = sign.getFrontText();
- text.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData()));
- text.setHasGlowingText(hasGlowingText);
+ // Paper start - fix sign change using immutable SignText type
+ text = text.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData()));
+ text = text.setHasGlowingText(hasGlowingText);
for (int i = 0; i < components.length; i++) {
- text.setMessage(i, components[i]);
+ text = text.setMessage(i, components[i]);
}
+ sign.setText(text, true);
+ // Paper end - fix sign change using immutable SignText type
getHandle().connection.send(sign.getUpdatePacket());
// Paper end

@ -1 +1 @@
Subproject commit f1dd65ed73b7cca00527ff81d02ce4d27c456a37
Subproject commit fdff0cd477bff16874060e6ebb82671955c04e78

@ -1 +1 @@
Subproject commit 9c5d600d1395e9783a8369dc4227be2b05010107
Subproject commit ad6d0cffbeeddfa1e16574b2df0e575b7e037c8e