Implement BossBarViewer on Player (#9332)

* Implement BossBarViewer on Player

Author: Riley Park <rileysebastianpark@gmail.com>

* Implement BossBar#viewers
This commit is contained in:
Bjarne Koll 2023-06-12 23:43:39 +02:00 committed by GitHub
parent de19eb8c4a
commit 87dfff4cfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 283 additions and 225 deletions

View File

@ -2043,15 +2043,15 @@ 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..1c072fbfdeb25a4fada75dcaa7cade4d24ca556a 100644
index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd102492cf 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -42,7 +42,28 @@ import org.jetbrains.annotations.Nullable;
@@ -42,7 +42,41 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a player, connected or not
*/
-public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient {
+public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified { // Paper
+public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, net.kyori.adventure.bossbar.BossBarViewer { // Paper
+
+ // Paper start
+ @Override
@ -2060,6 +2060,19 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
+ }
+
+ /**
+ * Gets an unmodifiable view of all known currently active bossbars.
+ * <p>
+ * <b>This currently only returns bossbars shown to the player via
+ * {@link #showBossBar(net.kyori.adventure.bossbar.BossBar)} and does not contain bukkit
+ * {@link org.bukkit.boss.BossBar} instances shown to the player.</b>
+ *
+ * @return an unmodifiable view of all known currently active bossbars
+ * @since 4.14.0
+ */
+ @Override
+ @org.jetbrains.annotations.UnmodifiableView @NotNull Iterable<? extends net.kyori.adventure.bossbar.BossBar> activeBossBars();
+
+ /**
+ * Gets the "friendly" name to display of this player.
+ *
+ * @return the display name
@ -2076,7 +2089,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
/**
* {@inheritDoc}
@@ -59,7 +80,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -59,7 +93,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* places defined by plugins.
*
* @return the friendly name
@ -2086,7 +2099,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
@NotNull
public String getDisplayName();
@@ -71,15 +94,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -71,15 +107,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* places defined by plugins.
*
* @param name The new display name.
@ -2137,7 +2150,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
public String getPlayerListName();
/**
@@ -88,14 +146,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -88,14 +159,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
@ -2156,7 +2169,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
@Nullable
public String getPlayerListHeader();
@@ -103,7 +165,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -103,7 +178,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
@ -2166,7 +2179,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
@Nullable
public String getPlayerListFooter();
@@ -111,14 +175,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -111,14 +188,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
@ -2185,7 +2198,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
public void setPlayerListFooter(@Nullable String footer);
/**
@@ -127,7 +195,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -127,7 +208,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
@ -2195,7 +2208,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
public void setPlayerListHeaderFooter(@Nullable String header, @Nullable String footer);
/**
@@ -165,9 +235,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -165,9 +248,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Kicks player with custom kick message.
*
* @param message kick message
@ -2221,7 +2234,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
/**
* Says a message (or runs a command).
*
@@ -632,6 +718,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -632,6 +731,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items);
@ -2312,7 +2325,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
/**
* 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 +816,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -646,7 +829,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
@ -2322,7 +2335,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
/**
@@ -665,7 +837,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -665,7 +850,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
@ -2332,7 +2345,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException;
/**
@@ -685,7 +859,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -685,7 +872,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
@ -2342,7 +2355,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;
/**
@@ -1181,6 +1357,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1181,6 +1370,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* pack correctly.
* </ul>
*
@ -2350,7 +2363,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
* @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 +1414,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1237,8 +1427,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2358,25 +2371,6 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
public void setResourcePack(@NotNull String url, @Nullable byte[] hash, @Nullable String prompt);
+ // Paper start
/**
* Request that the player's client download and switch resource packs.
* <p>
@@ -1274,6 +1453,54 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param hash The sha1 hash sum of the resource pack file which is used
* to apply a cached version of the pack directly without downloading
* if it is available. Hast to be 20 bytes long!
+ * @param prompt The optional custom prompt message to be shown to client.
+ * @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.
+ * @throws IllegalArgumentException Thrown if the hash is not 20 bytes
+ * long.
+ */
+ default void setResourcePack(@NotNull String url, byte @Nullable [] hash, net.kyori.adventure.text.@Nullable Component prompt) {
+ this.setResourcePack(url, hash, prompt, false);
+ }
+ // Paper end
+
+ /**
+ * Request that the player's client download and switch resource packs.
+ * <p>
@ -2406,17 +2400,36 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
+ * pack correctly.
+ * </ul>
+ *
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component, boolean)}
+ * @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.
+ * @param hash The sha1 hash sum of the resource pack file which is used
+ * to apply a cached version of the pack directly without downloading
+ * if it is available. Hast to be 20 bytes long!
* @param force If true, the client will be disconnected from the server
* when it declines to use the resource pack.
* @throws IllegalArgumentException Thrown if the URL is null.
@@ -1328,8 +1555,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
+ * @param prompt The optional custom prompt message to be shown to client.
+ * @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.
+ * @throws IllegalArgumentException Thrown if the hash is not 20 bytes
+ * long.
+ */
+ default void setResourcePack(@NotNull String url, byte @Nullable [] hash, net.kyori.adventure.text.@Nullable Component prompt) {
+ this.setResourcePack(url, hash, prompt, false);
+ }
+ // Paper end
+
/**
* Request that the player's client download and switch resource packs.
* <p>
@@ -1268,6 +1507,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* pack correctly.
* </ul>
*
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component, boolean)}
* @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
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2474,7 +2487,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
/**
* Gets the Scoreboard displayed to this player
*
@@ -1445,7 +1721,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1445,7 +1734,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param title Title text
* @param subtitle Subtitle text
@ -2483,7 +2496,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
*/
@Deprecated
public void sendTitle(@Nullable String title, @Nullable String subtitle);
@@ -1464,7 +1740,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1464,7 +1753,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.
@ -2493,7 +2506,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
/**
@@ -1691,6 +1969,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1691,6 +1982,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public int getClientViewDistance();
@ -2508,7 +2521,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
/**
* Gets the player's estimated ping in milliseconds.
*
@@ -1716,8 +2002,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1716,8 +2015,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* they wish.
*
* @return the player's locale
@ -2519,7 +2532,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
public String getLocale();
/**
@@ -1769,6 +2057,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1769,6 +2070,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public boolean isAllowingServerListings();
@ -2534,7 +2547,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
// Spigot start
public class Spigot extends Entity.Spigot {
@@ -1800,11 +2096,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1800,11 +2109,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
throw new UnsupportedOperationException("Not supported yet.");
}
@ -2548,7 +2561,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
@Override
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet.");
@@ -1815,7 +2113,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1815,7 +2126,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param component the components to send
@ -2558,7 +2571,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
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 +2125,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1825,7 +2138,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param components the components to send
@ -2568,7 +2581,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
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 +2138,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1836,7 +2151,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
@ -2578,7 +2591,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..1c072fbfdeb25a4fada75dcaa7cade4d
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 +2151,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1847,7 +2164,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 1c072fbfdeb25a4fada75dcaa7cade4d24ca556a..e983cc255885622b9990492a3b6fd2fd77835d91 100644
index b7512fa8fa65a2832cd2123ef30b47cd102492cf..55113699efa19a5c222deb0113c9db3dd87ea475 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2156,7 +2156,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2169,7 +2169,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 e983cc255885622b9990492a3b6fd2fd77835d91..439572173999364b3ad9f5c89a1209773c51302b 100644
index 55113699efa19a5c222deb0113c9db3dd87ea475..a1eaa9c7057ec52b3e048b19b6722ef2d727cb84 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2008,6 +2008,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2021,6 +2021,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 439572173999364b3ad9f5c89a1209773c51302b..7be94e57dc2d665719e7dedfea790f0019a47310 100644
index a1eaa9c7057ec52b3e048b19b6722ef2d727cb84..cb63f5f5c5d273d7bb90a1efb767f846dc1f852b 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2022,6 +2022,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2035,6 +2035,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 b6ff3a80fcb5c0e843caa1cfdb165cf2cadb8bd2..f24bb5b22975bcbdce1bf1e80cf7a1b3
* 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 7be94e57dc2d665719e7dedfea790f0019a47310..67143a8ab7c18676054f5584dd2fd764a78c7836 100644
index cb63f5f5c5d273d7bb90a1efb767f846dc1f852b..ffae09c986c0441da82a9cc2c3e19c1104580fc7 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -872,6 +872,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -885,6 +885,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 67143a8ab7c18676054f5584dd2fd764a78c7836..87770881b17df45ff79fd8e26b78afec583eace0 100644
index ffae09c986c0441da82a9cc2c3e19c1104580fc7..deb0ec4943b6aba373a1b9ec13b0b6a2a56b533a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -906,6 +906,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -919,6 +919,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 87770881b17df45ff79fd8e26b78afec583eace0..b23e53ff71b50fcbadcb6c4e537a3e8f2164a692 100644
index deb0ec4943b6aba373a1b9ec13b0b6a2a56b533a..8151222b9b368446dac8088ef80e957aa2d59e82 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1486,7 +1486,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1499,7 +1499,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 87770881b17df45ff79fd8e26b78afec583eace0..b23e53ff71b50fcbadcb6c4e537a3e8f
public void setResourcePack(@NotNull String url);
/**
@@ -2312,6 +2314,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2325,6 +2327,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 b23e53ff71b50fcbadcb6c4e537a3e8f2164a692..ef8980a8a0f24f31d1e8e2cd80dcc2785e739896 100644
index 8151222b9b368446dac8088ef80e957aa2d59e82..3979e4287bc3359fa6e10d4bfd2d0007ba072ebb 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -873,6 +873,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -886,6 +886,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(@NotNull MapView map);
// Paper start
@ -48,7 +48,7 @@ index b23e53ff71b50fcbadcb6c4e537a3e8f2164a692..ef8980a8a0f24f31d1e8e2cd80dcc278
/**
* Sends the component to the player
*
@@ -900,9 +933,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -913,9 +946,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

@ -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 ef8980a8a0f24f31d1e8e2cd80dcc2785e739896..8578a0d8ee622e0208563630b5b275726733716d 100644
index 3979e4287bc3359fa6e10d4bfd2d0007ba072ebb..0e0ee093d023d9f8eeab5e36a90245c76f4a9fe7 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -313,15 +313,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -326,15 +326,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Saves the players current location, health, inventory, motion, and
@ -437,7 +437,7 @@ index ef8980a8a0f24f31d1e8e2cd80dcc2785e739896..8578a0d8ee622e0208563630b5b27572
* <p>
* Note: This will overwrite the players current inventory, health,
* motion, etc, with the state from the saved dat file.
@@ -556,7 +556,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -569,7 +569,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Plays an effect to just this player.
*
@ -446,7 +446,7 @@ index ef8980a8a0f24f31d1e8e2cd80dcc2785e739896..8578a0d8ee622e0208563630b5b27572
* @param loc the location to play the effect at
* @param effect the {@link Effect}
* @param data a data bit needed for some effects
@@ -890,7 +890,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -903,7 +903,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 ef8980a8a0f24f31d1e8e2cd80dcc2785e739896..8578a0d8ee622e0208563630b5b27572
* @param message The message to send
* @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
*/
@@ -1356,7 +1356,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1369,7 +1369,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 ef8980a8a0f24f31d1e8e2cd80dcc2785e739896..8578a0d8ee622e0208563630b5b27572
* remain hidden until the other plugin calls this method too.
*
* @param plugin Plugin that wants to show the player
@@ -1385,7 +1385,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1398,7 +1398,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Allows this player to see an entity that was previously hidden. If

View File

@ -57,15 +57,15 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b
+
+}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 8578a0d8ee622e0208563630b5b275726733716d..ca00c4383095de385f25a7ea311b48eb018642c3 100644
index 0e0ee093d023d9f8eeab5e36a90245c76f4a9fe7..31399c669ca27d72dd3821636ebc01aef615e469 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;
/**
* Represents a player, connected or not
*/
-public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified { // Paper
+public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, com.destroystokyo.paper.network.NetworkClient { // Paper
-public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, net.kyori.adventure.bossbar.BossBarViewer { // Paper
+public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, net.kyori.adventure.bossbar.BossBarViewer, com.destroystokyo.paper.network.NetworkClient { // Paper
// Paper start
@Override

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 ca00c4383095de385f25a7ea311b48eb018642c3..e8ebbba8973e1ea01366b7a6fee71163db7b39b7 100644
index 31399c669ca27d72dd3821636ebc01aef615e469..d487b536b35fec37e7f7e627f750cf27c3bf323c 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1199,6 +1199,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1212,6 +1212,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void resetPlayerWeather();
@ -29,7 +29,7 @@ index ca00c4383095de385f25a7ea311b48eb018642c3..e8ebbba8973e1ea01366b7a6fee71163
/**
* Gets the player's cooldown between picking up experience orbs.
*
@@ -1224,8 +1233,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1237,8 +1246,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 7f6400c58530d4827c197f3d1fbabfa34554010f..e4c85e67713c5ed4b8b1fcc3c4231327
/**
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e8ebbba8973e1ea01366b7a6fee71163db7b39b7..1879756c8dc3fa86e2aa2f223eee03b5fe2380eb 100644
index d487b536b35fec37e7f7e627f750cf27c3bf323c..c9c2543e5ec85e33173c2000f588940fb41c771e 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2488,6 +2488,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2501,6 +2501,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 1879756c8dc3fa86e2aa2f223eee03b5fe2380eb..05e76988427e5ebbde1a431b680a4529430ced68 100644
index c9c2543e5ec85e33173c2000f588940fb41c771e..1972d7134fb9246e9ed168e0807873a200d75121 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2333,10 +2333,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2346,10 +2346,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 05e76988427e5ebbde1a431b680a4529430ced68..b4c1014c05069c74309cbbccbdbbb6638f25115e 100644
index 1972d7134fb9246e9ed168e0807873a200d75121..d1cd70c1f53bafba9c766200df4ff2873b6f00e5 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -873,6 +873,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -886,6 +886,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(@NotNull MapView map);
// Paper start

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 b4c1014c05069c74309cbbccbdbbb6638f25115e..1bd9990f9a833aec2e24f72363135e555824eda7 100644
index d1cd70c1f53bafba9c766200df4ff2873b6f00e5..3fae6cc65749ea5129769b0d3006d16134f31e62 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2660,6 +2660,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2673,6 +2673,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

@ -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 1bd9990f9a833aec2e24f72363135e555824eda7..10345e136db5b51e4609ff60fd3ea8c1c1aadd84 100644
index 3fae6cc65749ea5129769b0d3006d16134f31e62..32499745d6126050ca089e7f3ceb948c95a38eb1 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2680,6 +2680,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2693,6 +2693,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 10345e136db5b51e4609ff60fd3ea8c1c1aadd84..8b2224e30fbf85e0fd9752aace0af1339c097d5a 100644
index 32499745d6126050ca089e7f3ceb948c95a38eb1..a52b899823f0a98e148d20a04f6b853a649ba50e 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2789,6 +2789,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2802,6 +2802,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 8b2224e30fbf85e0fd9752aace0af1339c097d5a..d6b1f760db35a294be24ed791fe0030b4eeb8ff2 100644
index a52b899823f0a98e148d20a04f6b853a649ba50e..6a9e719c39dd7420d181b6c625636ade16f084f4 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2686,6 +2686,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2699,6 +2699,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 d6b1f760db35a294be24ed791fe0030b4eeb8ff2..d9e311eb10fd93565cb269ebe3d18cb6e1cd8f82 100644
index 6a9e719c39dd7420d181b6c625636ade16f084f4..0c87b9106d4dd1f9e8e7427d22efebc599f0d535 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2699,6 +2699,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2712,6 +2712,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 d9e311eb10fd93565cb269ebe3d18cb6e1cd8f82..83ed2738aec8bfe2d0c09247d0555a12c58f25cc 100644
index 0c87b9106d4dd1f9e8e7427d22efebc599f0d535..5b01568408cf561b49b2b9a567ba7e9920e66dde 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -252,6 +252,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -265,6 +265,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

@ -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 83ed2738aec8bfe2d0c09247d0555a12c58f25cc..cf045877f410ef5bbea33b817754c3908cdc0c4f 100644
index 5b01568408cf561b49b2b9a567ba7e9920e66dde..c726ea381994419b0f2c4d9dfae52bb87dabc732 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2075,6 +2075,31 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2088,6 +2088,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 cf045877f410ef5bbea33b817754c3908cdc0c4f..74c17e989d5023c850a96bd56a28f32991e43c7d 100644
index c726ea381994419b0f2c4d9dfae52bb87dabc732..084e7031e0a7457e61052f04e2f554d43e4f4d3e 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -672,6 +672,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -685,6 +685,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 74c17e989d5023c850a96bd56a28f32991e43c7d..4a86eb3fd2e377e40bbc505df24cf330c9360e48 100644
index 084e7031e0a7457e61052f04e2f554d43e4f4d3e..d37272b80dc3c1f923cebf387ac35b7ec13ca3cc 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2879,6 +2879,49 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2892,6 +2892,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 4a86eb3fd2e377e40bbc505df24cf330c9360e48..13b7375ab7c90438c37547d09a112115e0dcbd52 100644
index d37272b80dc3c1f923cebf387ac35b7ec13ca3cc..e5877f30aa21e1a3d7b9889160b64312e0f87b5c 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2766,6 +2766,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2779,6 +2779,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

@ -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 13b7375ab7c90438c37547d09a112115e0dcbd52..ea2363e27bf6c22b726a8728e4985e5c1ab945ee 100644
index e5877f30aa21e1a3d7b9889160b64312e0f87b5c..7b8b0db8fbff229a880ba32ff75aa87c598b3614 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2941,6 +2941,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2954,6 +2954,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 ea2363e27bf6c22b726a8728e4985e5c1ab945ee..390ca508f674f3ecb2b7e50c07536e3deab25625 100644
index 7b8b0db8fbff229a880ba32ff75aa87c598b3614..d0d6010ea2d215996c7751c051324d9c64c57867 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2957,6 +2957,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2970,6 +2970,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 390ca508f674f3ecb2b7e50c07536e3deab25625..0e17a72e70d89f5d79b4ceb397ba3c801239c682 100644
index d0d6010ea2d215996c7751c051324d9c64c57867..13fe7e859a947500de2534ec556380d4c62b425f 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -393,9 +393,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -406,9 +406,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 0e17a72e70d89f5d79b4ceb397ba3c801239c682..9344c16bee73b935c2a62eee2b6b67bbe20fc4e4 100644
index 13fe7e859a947500de2534ec556380d4c62b425f..658ecb1942c63e0e4b087501dab23758e9a836cc 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -296,6 +296,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -309,6 +309,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @return true if player is in sneak mode
*/
@ -46,7 +46,7 @@ index 0e17a72e70d89f5d79b4ceb397ba3c801239c682..9344c16bee73b935c2a62eee2b6b67bb
public boolean isSneaking();
/**
@@ -303,6 +304,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -316,6 +317,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 9344c16bee73b935c2a62eee2b6b67bbe20fc4e4..eecd8301a29ef300fe97841d767e443349409c03 100644
index 658ecb1942c63e0e4b087501dab23758e9a836cc..d4b4bc08c420727d4a7f5414ee49bca2970cfed7 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1536,6 +1536,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1549,6 +1549,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 eecd8301a29ef300fe97841d767e443349409c03..1e5e757b1e3bd02e595020704d14244330555bf0 100644
index d4b4bc08c420727d4a7f5414ee49bca2970cfed7..4ee0eb177f6b5765a9d7263576bb36c8a8366979 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -903,6 +903,47 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -916,6 +916,47 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendMap(@NotNull MapView map);

View File

@ -102,6 +102,96 @@ index 0000000000000000000000000000000000000000..3246049fd557951d971ef40112a411c1
+ }
+ }
+}
diff --git a/src/main/java/io/papermc/paper/adventure/BossBarImplementationImpl.java b/src/main/java/io/papermc/paper/adventure/BossBarImplementationImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..465d634dae2e94a488c03376c3ec59a242c8e59b
--- /dev/null
+++ b/src/main/java/io/papermc/paper/adventure/BossBarImplementationImpl.java
@@ -0,0 +1,84 @@
+package io.papermc.paper.adventure;
+
+import com.google.common.collect.Collections2;
+import java.util.Set;
+import java.util.function.Function;
+import net.kyori.adventure.bossbar.BossBar;
+import net.kyori.adventure.bossbar.BossBarImplementation;
+import net.kyori.adventure.bossbar.BossBarViewer;
+import net.kyori.adventure.text.Component;
+import net.minecraft.network.protocol.game.ClientboundBossEventPacket;
+import net.minecraft.server.level.ServerBossEvent;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.BossEvent;
+import org.bukkit.craftbukkit.entity.CraftPlayer;
+import org.checkerframework.checker.nullness.qual.NonNull;
+import org.jetbrains.annotations.NotNull;
+
+public final class BossBarImplementationImpl implements BossBar.Listener, BossBarImplementation {
+ private final BossBar bar;
+ private ServerBossEvent vanilla;
+
+ public BossBarImplementationImpl(final BossBar bar) {
+ this.bar = bar;
+ }
+
+ public void playerShow(final CraftPlayer player) {
+ if (this.vanilla == null) {
+ this.vanilla = new ServerBossEvent(
+ PaperAdventure.asVanilla(this.bar.name()),
+ PaperAdventure.asVanilla(this.bar.color()),
+ PaperAdventure.asVanilla(this.bar.overlay())
+ );
+ this.vanilla.adventure = this.bar;
+ this.bar.addListener(this);
+ }
+ this.vanilla.addPlayer(player.getHandle());
+ }
+
+ public void playerHide(final CraftPlayer player) {
+ if (this.vanilla != null) {
+ this.vanilla.removePlayer(player.getHandle());
+ if (this.vanilla.getPlayers().isEmpty()) {
+ this.bar.removeListener(this);
+ this.vanilla = null;
+ }
+ }
+ }
+
+ @Override
+ public void bossBarNameChanged(final @NonNull BossBar bar, final @NonNull Component oldName, final @NonNull Component newName) {
+ this.maybeBroadcast(ClientboundBossEventPacket::createUpdateNamePacket);
+ }
+
+ @Override
+ public void bossBarProgressChanged(final @NonNull BossBar bar, final float oldProgress, final float newProgress) {
+ this.maybeBroadcast(ClientboundBossEventPacket::createUpdateProgressPacket);
+ }
+
+ @Override
+ public void bossBarColorChanged(final @NonNull BossBar bar, final BossBar.@NonNull Color oldColor, final BossBar.@NonNull Color newColor) {
+ this.maybeBroadcast(ClientboundBossEventPacket::createUpdateStylePacket);
+ }
+
+ @Override
+ public void bossBarOverlayChanged(final @NonNull BossBar bar, final BossBar.@NonNull Overlay oldOverlay, final BossBar.@NonNull Overlay newOverlay) {
+ this.maybeBroadcast(ClientboundBossEventPacket::createUpdateStylePacket);
+ }
+
+ @Override
+ public void bossBarFlagsChanged(final @NonNull BossBar bar, final @NonNull Set<BossBar.Flag> flagsAdded, final @NonNull Set<BossBar.Flag> flagsRemoved) {
+ this.maybeBroadcast(ClientboundBossEventPacket::createUpdatePropertiesPacket);
+ }
+
+ @Override
+ public @NotNull Iterable<? extends BossBarViewer> viewers() {
+ return this.vanilla == null ? Set.of() : Collections2.transform(this.vanilla.getPlayers(), ServerPlayer::getBukkitEntity);
+ }
+
+ private void maybeBroadcast(final Function<BossEvent, ClientboundBossEventPacket> fn) {
+ if (this.vanilla != null) {
+ this.vanilla.broadcast(fn);
+ }
+ }
+}
diff --git a/src/main/java/io/papermc/paper/adventure/ChatDecorationProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatDecorationProcessor.java
new file mode 100644
index 0000000000000000000000000000000000000000..3b53d87a52cafb2503419f21ddd87d42a5ec0330
@ -1130,56 +1220,6 @@ index 0000000000000000000000000000000000000000..3dc613116c086444ece88bcb0a569eee
+ return ChatFormatting.getByHexValue(color.value());
+ }
+}
diff --git a/src/main/java/io/papermc/paper/adventure/VanillaBossBarListener.java b/src/main/java/io/papermc/paper/adventure/VanillaBossBarListener.java
new file mode 100644
index 0000000000000000000000000000000000000000..7493efba31403cbe7f26e493f165f1b83aa847bb
--- /dev/null
+++ b/src/main/java/io/papermc/paper/adventure/VanillaBossBarListener.java
@@ -0,0 +1,44 @@
+package io.papermc.paper.adventure;
+
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.function.Function;
+
+import net.kyori.adventure.bossbar.BossBar;
+import net.kyori.adventure.text.Component;
+import net.minecraft.network.protocol.game.ClientboundBossEventPacket;
+import net.minecraft.world.BossEvent;
+import org.checkerframework.checker.nullness.qual.NonNull;
+
+public final class VanillaBossBarListener implements BossBar.Listener {
+ private final Consumer<Function<BossEvent, ClientboundBossEventPacket>> action;
+
+ public VanillaBossBarListener(final Consumer<Function<BossEvent, ClientboundBossEventPacket>> action) {
+ this.action = action;
+ }
+
+ @Override
+ public void bossBarNameChanged(final @NonNull BossBar bar, final @NonNull Component oldName, final @NonNull Component newName) {
+ this.action.accept(ClientboundBossEventPacket::createUpdateNamePacket);
+ }
+
+ @Override
+ public void bossBarProgressChanged(final @NonNull BossBar bar, final float oldProgress, final float newProgress) {
+ this.action.accept(ClientboundBossEventPacket::createUpdateProgressPacket);
+ }
+
+ @Override
+ public void bossBarColorChanged(final @NonNull BossBar bar, final BossBar.@NonNull Color oldColor, final BossBar.@NonNull Color newColor) {
+ this.action.accept(ClientboundBossEventPacket::createUpdateStylePacket);
+ }
+
+ @Override
+ public void bossBarOverlayChanged(final @NonNull BossBar bar, final BossBar.@NonNull Overlay oldOverlay, final BossBar.@NonNull Overlay newOverlay) {
+ this.action.accept(ClientboundBossEventPacket::createUpdateStylePacket);
+ }
+
+ @Override
+ public void bossBarFlagsChanged(final @NonNull BossBar bar, final @NonNull Set<BossBar.Flag> flagsAdded, final @NonNull Set<BossBar.Flag> flagsRemoved) {
+ this.action.accept(ClientboundBossEventPacket::createUpdatePropertiesPacket);
+ }
+}
diff --git a/src/main/java/io/papermc/paper/adventure/WrapperAwareSerializer.java b/src/main/java/io/papermc/paper/adventure/WrapperAwareSerializer.java
new file mode 100644
index 0000000000000000000000000000000000000000..2a08e0461db4e699b7e6a1558a4419c848fc7f4f
@ -1206,6 +1246,26 @@ index 0000000000000000000000000000000000000000..2a08e0461db4e699b7e6a1558a4419c8
+ return net.minecraft.network.chat.Component.Serializer.fromJson(GsonComponentSerializer.gson().serializer().toJsonTree(component));
+ }
+}
diff --git a/src/main/java/io/papermc/paper/adventure/providers/BossBarImplementationProvider.java b/src/main/java/io/papermc/paper/adventure/providers/BossBarImplementationProvider.java
new file mode 100644
index 0000000000000000000000000000000000000000..2ee72fe7cb56e70404b8c86f0c9578750a45af03
--- /dev/null
+++ b/src/main/java/io/papermc/paper/adventure/providers/BossBarImplementationProvider.java
@@ -0,0 +1,14 @@
+package io.papermc.paper.adventure.providers;
+
+import io.papermc.paper.adventure.BossBarImplementationImpl;
+import net.kyori.adventure.bossbar.BossBar;
+import net.kyori.adventure.bossbar.BossBarImplementation;
+import org.jetbrains.annotations.NotNull;
+
+@SuppressWarnings("UnstableApiUsage") // permitted provider
+public class BossBarImplementationProvider implements BossBarImplementation.Provider {
+ @Override
+ public @NotNull BossBarImplementation create(final @NotNull BossBar bar) {
+ return new BossBarImplementationImpl(bar);
+ }
+}
diff --git a/src/main/java/io/papermc/paper/adventure/providers/ClickCallbackProviderImpl.java b/src/main/java/io/papermc/paper/adventure/providers/ClickCallbackProviderImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..3c17001bcd3862a76a22df488bff80a0ff4d1b83
@ -1561,48 +1621,6 @@ index 0000000000000000000000000000000000000000..c0701d4f93a4d77a8177d2dd8d5076f9
+ return builder -> builder.flattener(PaperAdventure.FLATTENER);
+ }
+}
diff --git a/src/main/java/net/kyori/adventure/bossbar/HackyBossBarPlatformBridge.java b/src/main/java/net/kyori/adventure/bossbar/HackyBossBarPlatformBridge.java
new file mode 100644
index 0000000000000000000000000000000000000000..2dc92d8d2764d3e9b621d5c7d5e30c30367b3117
--- /dev/null
+++ b/src/main/java/net/kyori/adventure/bossbar/HackyBossBarPlatformBridge.java
@@ -0,0 +1,36 @@
+package net.kyori.adventure.bossbar;
+
+import io.papermc.paper.adventure.PaperAdventure;
+import io.papermc.paper.adventure.VanillaBossBarListener;
+import net.minecraft.server.level.ServerBossEvent;
+import org.bukkit.craftbukkit.entity.CraftPlayer;
+
+public abstract class HackyBossBarPlatformBridge {
+ public ServerBossEvent vanilla$bar;
+ private VanillaBossBarListener vanilla$listener;
+
+ public final void paper$playerShow(final CraftPlayer player) {
+ if (this.vanilla$bar == null) {
+ final BossBar $this = (BossBar) this;
+ this.vanilla$bar = new ServerBossEvent(
+ PaperAdventure.asVanilla($this.name()),
+ PaperAdventure.asVanilla($this.color()),
+ PaperAdventure.asVanilla($this.overlay())
+ );
+ this.vanilla$bar.adventure = $this;
+ this.vanilla$listener = new VanillaBossBarListener(this.vanilla$bar::broadcast);
+ $this.addListener(this.vanilla$listener);
+ }
+ this.vanilla$bar.addPlayer(player.getHandle());
+ }
+
+ public final void paper$playerHide(final CraftPlayer player) {
+ if (this.vanilla$bar != null) {
+ this.vanilla$bar.removePlayer(player.getHandle());
+ if (this.vanilla$bar.getPlayers().isEmpty()) {
+ ((BossBar) this).removeListener(this.vanilla$listener);
+ this.vanilla$bar = null;
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/minecraft/ChatFormatting.java b/src/main/java/net/minecraft/ChatFormatting.java
index 98f2def9125d6faf5859572a004fa8d2fa066417..436f381c727cda72c04859c540dce4715b445390 100644
--- a/src/main/java/net/minecraft/ChatFormatting.java
@ -3614,7 +3632,7 @@ 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 242b6cb2ac775b4fc687a5a62011b53ab7bde7f6..d1e6cfe6009a31e109b4061ac3cba48947404f44 100644
index 242b6cb2ac775b4fc687a5a62011b53ab7bde7f6..e087ec1f456a8eff1071700fb98eac792ebb8d19 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -285,14 +285,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -3833,7 +3851,7 @@ index 242b6cb2ac775b4fc687a5a62011b53ab7bde7f6..d1e6cfe6009a31e109b4061ac3cba489
@Override
public int getPing() {
return this.getHandle().latency;
@@ -2124,6 +2211,232 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2124,6 +2211,252 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().allowsListing();
}
@ -3992,14 +4010,34 @@ index 242b6cb2ac775b4fc687a5a62011b53ab7bde7f6..d1e6cfe6009a31e109b4061ac3cba489
+
+ // resetTitle implemented above
+
+ private @Nullable Set<net.kyori.adventure.bossbar.BossBar> activeBossBars;
+
+ @Override
+ public @NotNull Iterable<? extends net.kyori.adventure.bossbar.BossBar> activeBossBars() {
+ if (this.activeBossBars != null) {
+ return java.util.Collections.unmodifiableSet(this.activeBossBars);
+ }
+ return Set.of();
+ }
+
+ @Override
+ public void showBossBar(final net.kyori.adventure.bossbar.BossBar bar) {
+ ((net.kyori.adventure.bossbar.HackyBossBarPlatformBridge) bar).paper$playerShow(this);
+ net.kyori.adventure.bossbar.BossBarImplementation.get(bar, io.papermc.paper.adventure.BossBarImplementationImpl.class).playerShow(this);
+ if (this.activeBossBars == null) {
+ this.activeBossBars = new HashSet<>();
+ }
+ this.activeBossBars.add(bar);
+ }
+
+ @Override
+ public void hideBossBar(final net.kyori.adventure.bossbar.BossBar bar) {
+ ((net.kyori.adventure.bossbar.HackyBossBarPlatformBridge) bar).paper$playerHide(this);
+ net.kyori.adventure.bossbar.BossBarImplementation.get(bar, io.papermc.paper.adventure.BossBarImplementationImpl.class).playerHide(this);
+ if (this.activeBossBars != null) {
+ this.activeBossBars.remove(bar);
+ if (this.activeBossBars.isEmpty()) {
+ this.activeBossBars = null;
+ }
+ }
+ }
+
+ @Override
@ -4942,6 +4980,13 @@ index 838d5b877c01be3ef353f434d98e27b46c0a3fb4..5c4c0ba05f10d2d83b22d3e86805cfa8
HashSet<Player> reference = new HashSet<Player>(players.size());
for (ServerPlayer player : players) {
reference.add(player.getBukkitEntity());
diff --git a/src/main/resources/META-INF/services/net.kyori.adventure.bossbar.BossBarImplementation$Provider b/src/main/resources/META-INF/services/net.kyori.adventure.bossbar.BossBarImplementation$Provider
new file mode 100644
index 0000000000000000000000000000000000000000..9b7119d0b88bf7f9d25fab37a15340cabc0c9b7b
--- /dev/null
+++ b/src/main/resources/META-INF/services/net.kyori.adventure.bossbar.BossBarImplementation$Provider
@@ -0,0 +1 @@
+io.papermc.paper.adventure.providers.BossBarImplementationProvider
diff --git a/src/main/resources/META-INF/services/net.kyori.adventure.text.event.ClickCallback$Provider b/src/main/resources/META-INF/services/net.kyori.adventure.text.event.ClickCallback$Provider
new file mode 100644
index 0000000000000000000000000000000000000000..845711e03c41c6b6a03d541f1c43d37b24c11733

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 d1e6cfe6009a31e109b4061ac3cba48947404f44..11aebe27875a30dfc6bd82d486d0d79bfe2e77a1 100644
index e087ec1f456a8eff1071700fb98eac792ebb8d19..c53b2c452d8e42dca202c5fc7e8dcca4ccf8e4ba 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2512,6 +2512,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2532,6 +2532,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

@ -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 8c31faad675edffedf8abfa0bc383ecb2fe6ddad..a825805c4c1506628550864b8d1566727b15a10c 100644
index 755aa5e3840f2b8b513351954ae035ad56f23cbb..875ac85307b3a1515aa101892010532a2f9cf4e1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2774,6 +2774,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2794,6 +2794,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.adventure$pointers;
}

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 30047bdd26f642279f7d438d1e5f4758726b785c..062d2c8e7c28e221fd6cccdef49d8bdce10c3c59 100644
index 2de1d3a69176ee5ce9792ccbdaa9900b8acbdd3b..4c7fa43293840781ee59ec0a387cf960e23dba51 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2821,6 +2821,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2841,6 +2841,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetCooldown() {
getHandle().resetAttackStrengthTicker();
}

View File

@ -56,10 +56,10 @@ index 391eed0b5631732d799c858d35f0c31b88f05123..3376cf61fdb06292ed02735990f84b00
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 7bed46c9bc305cbb67e145c9ea62de06708a1f00..ad0b59e750f453aaf151fec8bce72b4e7f690266 100644
index 60ae0913501dd9c2d28685c7b50709a5e572dfec..fec01a106a6210db04600c29737294370baa04d1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2938,6 +2938,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2958,6 +2958,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
};

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 27b8dffd5ba6bae22a8a12544d65a00f43394765..6c452b97429930ff3033d8cb74632923e12de2e3 100644
index a718f3c53fe1ee0550512e86ee5fab7c9594f416..ec6b296989e9436c13cf43d9a341dc89c3320389 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3109,6 +3109,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3129,6 +3129,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 6c452b97429930ff3033d8cb74632923e12de2e3..151788d379000ee4d3f5d1d51c014da8e8cd21a5 100644
index ec6b296989e9436c13cf43d9a341dc89c3320389..bab8770ae6b62b334055e03007883d64a3831891 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3114,6 +3114,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3134,6 +3134,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));
}