[CI-SKIP] Deprecate the view distance APIs on Player (#4945)

This commit is contained in:
Mariell 2020-12-27 12:37:37 +01:00 committed by GitHub
parent d9fd54e16c
commit e40ea889dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 17 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add player view distance API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index ab1a2816e3bc78be103823fd61cc5d01f8362552..ff46ea6aa545c910acaa7e5a7690e88e0129608c 100644 index ab1a2816e3bc78be103823fd61cc5d01f8362552..85c242034d125e5760952900557b10418ec5605b 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1286,6 +1286,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1286,6 +1286,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param affects Whether the player can affect mob spawning * @param affects Whether the player can affect mob spawning
*/ */
public void setAffectsSpawning(boolean affects); public void setAffectsSpawning(boolean affects);
@ -17,14 +17,22 @@ index ab1a2816e3bc78be103823fd61cc5d01f8362552..ff46ea6aa545c910acaa7e5a7690e88e
+ * Gets the view distance for this player + * Gets the view distance for this player
+ * + *
+ * @return the player's view distance + * @return the player's view distance
+ * @deprecated This is unimplemented and <i>will</i> throw an exception at runtime. The {@link org.bukkit.World World}-based methods still work.
+ * @see org.bukkit.World#getViewDistance()
+ * @see org.bukkit.World#getNoTickViewDistance()
+ */ + */
+ @Deprecated
+ public int getViewDistance(); + public int getViewDistance();
+ +
+ /** + /**
+ * Sets the view distance for this player + * Sets the view distance for this player
+ * + *
+ * @param viewDistance the player's view distance + * @param viewDistance the player's view distance
+ * @deprecated This is unimplemented and <i>will</i> throw an exception at runtime. The {@link org.bukkit.World World}-based methods still work.
+ * @see org.bukkit.World#setViewDistance(int)
+ * @see org.bukkit.World#setNoTickViewDistance(int)
+ */ + */
+ @Deprecated
+ public void setViewDistance(int viewDistance); + public void setViewDistance(int viewDistance);
// Paper end // Paper end

View file

@ -5,7 +5,7 @@ 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 diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index c12087cd9551ad254867c428139bdf38b5c7770c..e8fd982380cc55a2a5ff3cb4aea0b2f25857aa49 100644 index 7889e98443d1192ae633ff64584f00255725c9bd..b4874655e167c6459c823d5d79baeffdb690533a 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1022,7 +1022,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1022,7 +1022,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@ -18,7 +18,7 @@ index c12087cd9551ad254867c428139bdf38b5c7770c..e8fd982380cc55a2a5ff3cb4aea0b2f2
public void setResourcePack(@NotNull String url); public void setResourcePack(@NotNull String url);
/** /**
@@ -1460,6 +1462,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1468,6 +1470,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ */
public void openBook(@NotNull ItemStack book); public void openBook(@NotNull ItemStack book);

View file

@ -5,7 +5,7 @@ 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 diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e8fd982380cc55a2a5ff3cb4aea0b2f25857aa49..742c7b5a1919e2c3a70891d6c34756076c386368 100644 index b4874655e167c6459c823d5d79baeffdb690533a..fd235f7ac71b0243d2189e89efb232915991f9ff 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -484,6 +484,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -484,6 +484,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@ -54,7 +54,7 @@ index e8fd982380cc55a2a5ff3cb4aea0b2f25857aa49..742c7b5a1919e2c3a70891d6c3475607
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components); spigot().sendMessage(position, components);
} }
@@ -1585,9 +1614,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1593,9 +1622,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/** /**
* Sends the component to the specified screen position of this player * Sends the component to the specified screen position of this player
* *
@ -66,7 +66,7 @@ index e8fd982380cc55a2a5ff3cb4aea0b2f25857aa49..742c7b5a1919e2c3a70891d6c3475607
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { 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."); throw new UnsupportedOperationException("Not supported yet.");
} }
@@ -1595,9 +1626,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1603,9 +1634,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 * Sends an array of components as a single message to the specified screen position of this player
* *

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in. This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a489718adee9eb78a02d0a75198c4ec7af844a99..58a1e24f15043b21a1a99931cde628990a66831f 100644 index f20179c8c93691143f67a91320bcf923028168ef..8c8efb5ee88a51c831859ce26fc0953b1e9396d2 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3,6 +3,7 @@ package org.bukkit.entity; @@ -3,6 +3,7 @@ package org.bukkit.entity;
@ -17,7 +17,7 @@ index a489718adee9eb78a02d0a75198c4ec7af844a99..58a1e24f15043b21a1a99931cde62899
import org.bukkit.DyeColor; import org.bukkit.DyeColor;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.GameMode; import org.bukkit.GameMode;
@@ -1576,6 +1577,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1584,6 +1585,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
*/ */
boolean hasResourcePack(); boolean hasResourcePack();

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 diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e471728b2ab69c5f8568896030e4866c5bf258a1..59d39692abb48c23f1f832202bedda00815b0d6d 100644 index 5879500e0ad19b5834a89aa065c8a59d4d6520c1..d84de4918bf54965494ac2e64f5832f3d62e5a96 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1751,6 +1751,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1759,6 +1759,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param profile The new profile to use * @param profile The new profile to use
*/ */
void setPlayerProfile(@NotNull PlayerProfile profile); void setPlayerProfile(@NotNull PlayerProfile profile);

View file

@ -176,7 +176,7 @@ index 0000000000000000000000000000000000000000..f7f171c4ee0b8339b2f8fbe82442d65f
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 59d39692abb48c23f1f832202bedda00815b0d6d..fbb5ca4defd516bbcc888e8cf163154657314732 100644 index d84de4918bf54965494ac2e64f5832f3d62e5a96..20afeb742cbafbd03fb712f73d38e6b31cdd3a27 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2,6 +2,7 @@ package org.bukkit.entity; @@ -2,6 +2,7 @@ package org.bukkit.entity;
@ -187,7 +187,7 @@ index 59d39692abb48c23f1f832202bedda00815b0d6d..fbb5ca4defd516bbcc888e8cf1631546
import com.destroystokyo.paper.Title; // Paper import com.destroystokyo.paper.Title; // Paper
import com.destroystokyo.paper.profile.PlayerProfile; // Paper import com.destroystokyo.paper.profile.PlayerProfile; // Paper
import java.util.Date; // Paper import java.util.Date; // Paper
@@ -1771,6 +1772,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1779,6 +1780,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Reset the cooldown counter to 0, effectively starting the cooldown period. * Reset the cooldown counter to 0, effectively starting the cooldown period.
*/ */
void resetCooldown(); 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 diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index fbb5ca4defd516bbcc888e8cf163154657314732..bd294d776216d98899ed58fae739df2405a735e6 100644 index 20afeb742cbafbd03fb712f73d38e6b31cdd3a27..d2dc27e02001b95c29857f251db4e343ed785ab8 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1898,6 +1898,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1906,6 +1906,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
// Paper end // 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 diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index bd294d776216d98899ed58fae739df2405a735e6..a23c08c48ec627147d94ab4bf4fdf4dae1edeaca 100644 index d2dc27e02001b95c29857f251db4e343ed785ab8..f7fd13dc6056817819c1dbffcaf19c25b95fe2c0 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1778,6 +1778,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -1786,6 +1786,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ */
@NotNull @NotNull
<T> T getClientOption(@NotNull ClientOption<T> option); <T> T getClientOption(@NotNull ClientOption<T> option);