Fixup command precprocess cancellation (#11424)
This commit is contained in:
parent
81d94483a2
commit
2f50b87277
3 changed files with 83 additions and 3 deletions
|
@ -1050,6 +1050,34 @@ index 08a7c564fe5d3d232998d1789d4d4723a59c1430..8a5be3f0322ac19aeac3f00df54add0e
|
|||
@NotNull
|
||||
@Override
|
||||
public AnvilView getView() {
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java b/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java
|
||||
index 48a00fb50fe32c732a578d5179b3bb43ffd68b69..6d7ee2c6e053ea9af9116e7c2adb521f12b914df 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java
|
||||
@@ -106,7 +106,9 @@ public class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancell
|
||||
*
|
||||
* @param player New player which this event will execute as
|
||||
* @throws IllegalArgumentException if the player provided is null
|
||||
+ * @deprecated Only works for sign commands; use {@link Player#performCommand(String)}, including those cases
|
||||
*/
|
||||
+ @Deprecated(forRemoval = true)
|
||||
public void setPlayer(@NotNull final Player player) throws IllegalArgumentException {
|
||||
Preconditions.checkArgument(player != null, "Player cannot be null");
|
||||
this.player = player;
|
||||
@@ -123,11 +125,10 @@ public class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancell
|
||||
* unmodifiable set.
|
||||
*
|
||||
* @return All Players who will see this chat message
|
||||
- * @deprecated This method is provided for backward compatibility with no
|
||||
- * guarantee to the effect of viewing or modifying the set.
|
||||
+ * @deprecated This is simply the online players. Modifications have no effect
|
||||
*/
|
||||
@NotNull
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true)
|
||||
public Set<Player> getRecipients() {
|
||||
return recipients;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
|
||||
index e4c32b21ab013703a6a1b07a1ad564d914ebe83f..e58fecf0fe54db06e0e944027923a352fd8005d8 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue