mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@597dcfff Add support for lz4 (#12053) PaperMC/Paper@53ae5c95 Make Sittable interface extend Entity (#12016) PaperMC/Paper@786ddf53 Default piston block entity direction to DOWN (#12039) PaperMC/Paper@cb6c57e0 Fix Squid and Dolphin spawn height (#12045) PaperMC/Paper@51acc802 Prevent duplicate raider in RaidSpawnWaveEvent list (#12040) PaperMC/Paper@61312fdb Switch to jspecify annotations for Player (#12042) PaperMC/Paper@1a04e96a Fix EntityBreedEvent cancellation (#12046) PaperMC/Paper@eff617b8 [ci/skip] Deprecate Server#setSpawnRadius (#12024)
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] Purpur config files
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 365368983a25f7ccbd3c8b7b572a5173a4c868a0..594bcedd823acc87ed429ad8ef17b66e9dc15beb 100644
|
||||
index 7d5a3f8fe257000b559d64bc045b1e4a14bb295d..78637a4f9650c1dd7ccc94bbfeb1fac048aa7f69 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2330,6 +2330,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2334,6 +2334,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2980,4 +_,133 @@
|
||||
@@ -2984,4 +_,133 @@
|
||||
public static Server.Spigot spigot() {
|
||||
return server.spigot();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
@@ -573,4 +_,106 @@
|
||||
@@ -567,4 +_,104 @@
|
||||
@Override
|
||||
io.papermc.paper.persistence.@NotNull PersistentDataContainerView getPersistentDataContainer();
|
||||
io.papermc.paper.persistence.PersistentDataContainerView getPersistentDataContainer();
|
||||
// Paper end - add pdc to offline player
|
||||
+
|
||||
+ // Purpur start - OfflinePlayer API
|
||||
@@ -12,7 +12,7 @@
|
||||
+ *
|
||||
+ * @return True if the player is allowed to fly.
|
||||
+ */
|
||||
+ public boolean getAllowFlight();
|
||||
+ boolean getAllowFlight();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets if the OfflinePlayer is allowed to fly via jump key double-tap like in
|
||||
@@ -20,21 +20,21 @@
|
||||
+ *
|
||||
+ * @param flight If flight should be allowed.
|
||||
+ */
|
||||
+ public void setAllowFlight(boolean flight);
|
||||
+ void setAllowFlight(boolean flight);
|
||||
+
|
||||
+ /**
|
||||
+ * Checks to see if this player is currently flying or not.
|
||||
+ *
|
||||
+ * @return True if the player is flying, else false.
|
||||
+ */
|
||||
+ public boolean isFlying();
|
||||
+ boolean isFlying();
|
||||
+
|
||||
+ /**
|
||||
+ * Makes this player start or stop flying.
|
||||
+ *
|
||||
+ * @param value True to fly.
|
||||
+ */
|
||||
+ public void setFlying(boolean value);
|
||||
+ void setFlying(boolean value);
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the speed at which a client will fly. Negative values indicate
|
||||
@@ -44,7 +44,7 @@
|
||||
+ * @throws IllegalArgumentException If new speed is less than -1 or
|
||||
+ * greater than 1
|
||||
+ */
|
||||
+ public void setFlySpeed(float value) throws IllegalArgumentException;
|
||||
+ void setFlySpeed(float value) throws IllegalArgumentException;
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the speed at which a client will walk. Negative values indicate
|
||||
@@ -54,21 +54,21 @@
|
||||
+ * @throws IllegalArgumentException If new speed is less than -1 or
|
||||
+ * greater than 1
|
||||
+ */
|
||||
+ public void setWalkSpeed(float value) throws IllegalArgumentException;
|
||||
+ void setWalkSpeed(float value) throws IllegalArgumentException;
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the current allowed speed that a client can fly.
|
||||
+ *
|
||||
+ * @return The current allowed speed, from -1 to 1
|
||||
+ */
|
||||
+ public float getFlySpeed();
|
||||
+ float getFlySpeed();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the current allowed speed that a client can walk.
|
||||
+ *
|
||||
+ * @return The current allowed speed, from -1 to 1
|
||||
+ */
|
||||
+ public float getWalkSpeed();
|
||||
+ float getWalkSpeed();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets OfflinePlayer's location. If player is online, it falls back to the Player#teleport implementation.
|
||||
@@ -76,7 +76,7 @@
|
||||
+ * @param destination
|
||||
+ * @return true if teleportation was successful
|
||||
+ */
|
||||
+ public boolean teleportOffline(@NotNull org.bukkit.Location destination);
|
||||
+ boolean teleportOffline(org.bukkit.Location destination);
|
||||
+
|
||||
+ /**
|
||||
+ * Sets OfflinePlayer's location. If player is online, it falls back to the Player#teleport implementation.
|
||||
@@ -85,7 +85,7 @@
|
||||
+ * @param cause Teleport cause used if player is online
|
||||
+ * @return true if teleportation was successful
|
||||
+ */
|
||||
+ public boolean teleportOffline(@NotNull org.bukkit.Location destination, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause);
|
||||
+ boolean teleportOffline(org.bukkit.Location destination, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause);
|
||||
+
|
||||
+ /**
|
||||
+ * Sets OfflinePlayer's location. If player is online, it falls back to the Player#teleportAsync implementation.
|
||||
@@ -93,8 +93,7 @@
|
||||
+ * @param destination
|
||||
+ * @return <code>true</code> if teleportation successful
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public java.util.concurrent.CompletableFuture<Boolean> teleportOfflineAsync(@NotNull Location destination);
|
||||
+ java.util.concurrent.CompletableFuture<Boolean> teleportOfflineAsync(Location destination);
|
||||
+
|
||||
+ /**
|
||||
+ * Sets OfflinePlayer's location. If player is online, it falls back to the Player#teleportAsync implementation.
|
||||
@@ -103,7 +102,6 @@
|
||||
+ * @param cause Teleport cause used if player is online
|
||||
+ * @return <code>true</code> if teleportation successful
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public java.util.concurrent.CompletableFuture<Boolean> teleportOfflineAsync(@NotNull Location destination, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause);
|
||||
+ java.util.concurrent.CompletableFuture<Boolean> teleportOfflineAsync(Location destination, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause);
|
||||
+ // Purpur end - OfflinePlayer API
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2654,4 +_,111 @@
|
||||
@@ -2658,4 +_,111 @@
|
||||
*/
|
||||
void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value);
|
||||
// Paper end - API to check if the server is sleeping
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3928,4 +_,123 @@
|
||||
@@ -3902,4 +_,123 @@
|
||||
* @return the result of this method, holding leftovers and spawned items.
|
||||
*/
|
||||
@NotNull PlayerGiveResult give(@NotNull Collection<@NotNull ItemStack> items, boolean dropIfFull);
|
||||
PlayerGiveResult give(Collection<ItemStack> items, boolean dropIfFull);
|
||||
+
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
@@ -11,7 +11,7 @@
|
||||
+ *
|
||||
+ * @return true if player uses PurpurClient
|
||||
+ */
|
||||
+ public boolean usesPurpurClient();
|
||||
+ boolean usesPurpurClient();
|
||||
+
|
||||
+ /**
|
||||
+ * Check if player is AFK
|
||||
@@ -40,7 +40,7 @@
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration);
|
||||
+ void sendBlockHighlight(Location location, int duration);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
@@ -50,7 +50,7 @@
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, int argb);
|
||||
+ void sendBlockHighlight(Location location, int duration, int argb);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
@@ -60,7 +60,7 @@
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @param text Text to show above the highlight
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text);
|
||||
+ void sendBlockHighlight(Location location, int duration, String text);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
@@ -71,7 +71,7 @@
|
||||
+ * @param text Text to show above the highlight
|
||||
+ * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, int argb);
|
||||
+ void sendBlockHighlight(Location location, int duration, String text, int argb);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
@@ -83,7 +83,7 @@
|
||||
+ * @param transparency Transparency of the highlight
|
||||
+ * @throws IllegalArgumentException If transparency is outside 0-255 range
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull org.bukkit.Color color, int transparency);
|
||||
+ void sendBlockHighlight(Location location, int duration, org.bukkit.Color color, int transparency);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
@@ -96,7 +96,7 @@
|
||||
+ * @param transparency Transparency of the highlight
|
||||
+ * @throws IllegalArgumentException If transparency is outside 0-255 range
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, @NotNull org.bukkit.Color color, int transparency);
|
||||
+ void sendBlockHighlight(Location location, int duration, String text, org.bukkit.Color color, int transparency);
|
||||
+
|
||||
+ /**
|
||||
+ * Clears all debug block highlights
|
||||
@@ -108,7 +108,7 @@
|
||||
+ *
|
||||
+ * @param message The death message to show the player
|
||||
+ */
|
||||
+ void sendDeathScreen(@NotNull net.kyori.adventure.text.Component message);
|
||||
+ void sendDeathScreen(net.kyori.adventure.text.Component message);
|
||||
+
|
||||
+ /**
|
||||
+ * Sends a player the death screen with a specified death message,
|
||||
@@ -119,7 +119,7 @@
|
||||
+ * @deprecated Use {@link #sendDeathScreen(net.kyori.adventure.text.Component)} instead, as 1.20 removed the killer ID from the packet.
|
||||
+ */
|
||||
+ @Deprecated(since = "1.20")
|
||||
+ default void sendDeathScreen(@NotNull net.kyori.adventure.text.Component message, @Nullable Entity killer) {
|
||||
+ default void sendDeathScreen(net.kyori.adventure.text.Component message, @Nullable Entity killer) {
|
||||
+ sendDeathScreen(message);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
|
||||
Reference in New Issue
Block a user