Prepare for 1.19 dev
This commit is contained in:
		
					parent
					
						
							
								f34f678b20
							
						
					
				
			
			
				commit
				
					
						1148687a8d
					
				
			
		
					 1302 changed files with 120 additions and 61 deletions
				
			
		| 
						 | 
				
			
			@ -1,191 +0,0 @@
 | 
			
		|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
 | 
			
		||||
Date: Thu, 4 Nov 2021 12:31:45 -0700
 | 
			
		||||
Subject: [PATCH] Improve scoreboard entries
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
diff --git a/src/main/java/org/bukkit/scoreboard/Objective.java b/src/main/java/org/bukkit/scoreboard/Objective.java
 | 
			
		||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 | 
			
		||||
--- a/src/main/java/org/bukkit/scoreboard/Objective.java
 | 
			
		||||
+++ b/src/main/java/org/bukkit/scoreboard/Objective.java
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Objective {
 | 
			
		||||
      * @throws IllegalArgumentException if player is null
 | 
			
		||||
      * @throws IllegalStateException if this objective has been unregistered
 | 
			
		||||
      * @see #getScore(String)
 | 
			
		||||
-     * @deprecated Scoreboards can contain entries that aren't players
 | 
			
		||||
      */
 | 
			
		||||
-    @Deprecated
 | 
			
		||||
+    // @Deprecated // Paper
 | 
			
		||||
     @NotNull
 | 
			
		||||
     Score getScore(@NotNull OfflinePlayer player) throws IllegalArgumentException, IllegalStateException;
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Objective {
 | 
			
		||||
      */
 | 
			
		||||
     @NotNull
 | 
			
		||||
     Score getScore(@NotNull String entry) throws IllegalArgumentException, IllegalStateException;
 | 
			
		||||
+
 | 
			
		||||
+    // Paper start
 | 
			
		||||
+    /**
 | 
			
		||||
+     * Gets an entity's Score for an Objective on this Scoreboard.
 | 
			
		||||
+     *
 | 
			
		||||
+     * @param entity Entity for the Score
 | 
			
		||||
+     * @return Score tracking the Objective and entity specified
 | 
			
		||||
+     * @throws IllegalArgumentException if entity is null
 | 
			
		||||
+     * @throws IllegalStateException if this objective has been unregistered
 | 
			
		||||
+     */
 | 
			
		||||
+    @NotNull Score getScoreFor(@NotNull org.bukkit.entity.Entity entity) throws IllegalArgumentException, IllegalStateException;
 | 
			
		||||
+    // Paper end
 | 
			
		||||
 }
 | 
			
		||||
diff --git a/src/main/java/org/bukkit/scoreboard/Scoreboard.java b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
 | 
			
		||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 | 
			
		||||
--- a/src/main/java/org/bukkit/scoreboard/Scoreboard.java
 | 
			
		||||
+++ b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
 | 
			
		||||
      * @return immutable set of all scores tracked for the player
 | 
			
		||||
      * @throws IllegalArgumentException if player is null
 | 
			
		||||
      * @see #getScores(String)
 | 
			
		||||
-     * @deprecated Scoreboards can contain entries that aren't players
 | 
			
		||||
      */
 | 
			
		||||
-    @Deprecated
 | 
			
		||||
+    // @Deprecated // Paper
 | 
			
		||||
     @NotNull
 | 
			
		||||
     Set<Score> getScores(@NotNull OfflinePlayer player) throws IllegalArgumentException;
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
 | 
			
		||||
      * @param player the player to drop all current scores for
 | 
			
		||||
      * @throws IllegalArgumentException if player is null
 | 
			
		||||
      * @see #resetScores(String)
 | 
			
		||||
-     * @deprecated Scoreboards can contain entries that aren't players
 | 
			
		||||
      */
 | 
			
		||||
-    @Deprecated
 | 
			
		||||
+    // @Deprecated // Paper
 | 
			
		||||
     void resetScores(@NotNull OfflinePlayer player) throws IllegalArgumentException;
 | 
			
		||||
 
 | 
			
		||||
     /**
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
 | 
			
		||||
      * @return the player's Team or null if the player is not on a team
 | 
			
		||||
      * @throws IllegalArgumentException if player is null
 | 
			
		||||
      * @see #getEntryTeam(String)
 | 
			
		||||
-     * @deprecated Scoreboards can contain entries that aren't players
 | 
			
		||||
      */
 | 
			
		||||
-    @Deprecated
 | 
			
		||||
+    // @Deprecated // Paper
 | 
			
		||||
     @Nullable
 | 
			
		||||
     Team getPlayerTeam(@NotNull OfflinePlayer player) throws IllegalArgumentException;
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
 | 
			
		||||
      * @throws IllegalArgumentException if slot is null
 | 
			
		||||
      */
 | 
			
		||||
     void clearSlot(@NotNull DisplaySlot slot) throws IllegalArgumentException;
 | 
			
		||||
+
 | 
			
		||||
+    // Paper start
 | 
			
		||||
+    /**
 | 
			
		||||
+     * Gets all scores for a entity on this Scoreboard
 | 
			
		||||
+     *
 | 
			
		||||
+     * @param entity the entity whose scores are being retrieved
 | 
			
		||||
+     * @return immutable set of all scores tracked for the entity
 | 
			
		||||
+     * @throws IllegalArgumentException if entity is null
 | 
			
		||||
+     * @see #getScores(String)
 | 
			
		||||
+     */
 | 
			
		||||
+    @NotNull Set<Score> getScoresFor(@NotNull org.bukkit.entity.Entity entity) throws IllegalArgumentException;
 | 
			
		||||
+
 | 
			
		||||
+    /**
 | 
			
		||||
+     * Removes all scores for a entity on this Scoreboard
 | 
			
		||||
+     *
 | 
			
		||||
+     * @param entity the entity to drop all current scores for
 | 
			
		||||
+     * @throws IllegalArgumentException if entity is null
 | 
			
		||||
+     * @see #resetScores(String)
 | 
			
		||||
+     */
 | 
			
		||||
+    void resetScoresFor(@NotNull org.bukkit.entity.Entity entity) throws IllegalArgumentException;
 | 
			
		||||
+
 | 
			
		||||
+    /**
 | 
			
		||||
+     * Gets a entity's Team on this Scoreboard
 | 
			
		||||
+     *
 | 
			
		||||
+     * @param entity the entity to search for
 | 
			
		||||
+     * @return the entity's Team or null if the entity is not on a team
 | 
			
		||||
+     * @throws IllegalArgumentException if entity is null
 | 
			
		||||
+     * @see #getEntryTeam(String)
 | 
			
		||||
+     */
 | 
			
		||||
+    @Nullable Team getEntityTeam(@NotNull org.bukkit.entity.Entity entity) throws IllegalArgumentException;
 | 
			
		||||
+    // Paper end
 | 
			
		||||
 }
 | 
			
		||||
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
 | 
			
		||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 | 
			
		||||
--- a/src/main/java/org/bukkit/scoreboard/Team.java
 | 
			
		||||
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Team {
 | 
			
		||||
      * @throws IllegalArgumentException if player is null
 | 
			
		||||
      * @throws IllegalStateException if this team has been unregistered
 | 
			
		||||
      * @see #addEntry(String)
 | 
			
		||||
-     * @deprecated Teams can contain entries that aren't players
 | 
			
		||||
      */
 | 
			
		||||
-    @Deprecated
 | 
			
		||||
+    // @Deprecated // Paper
 | 
			
		||||
     void addPlayer(@NotNull OfflinePlayer player) throws IllegalStateException, IllegalArgumentException;
 | 
			
		||||
 
 | 
			
		||||
     /**
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Team {
 | 
			
		||||
      * @throws IllegalArgumentException if player is null
 | 
			
		||||
      * @throws IllegalStateException if this team has been unregistered
 | 
			
		||||
      * @see #removeEntry(String)
 | 
			
		||||
-     * @deprecated Teams can contain entries that aren't players
 | 
			
		||||
      */
 | 
			
		||||
-    @Deprecated
 | 
			
		||||
+    // @Deprecated // Paper
 | 
			
		||||
     boolean removePlayer(@NotNull OfflinePlayer player) throws IllegalStateException, IllegalArgumentException;
 | 
			
		||||
 
 | 
			
		||||
     /**
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Team {
 | 
			
		||||
      * @throws IllegalArgumentException if player is null
 | 
			
		||||
      * @throws IllegalStateException if this team has been unregistered
 | 
			
		||||
      * @see #hasEntry(String)
 | 
			
		||||
-     * @deprecated Teams can contain entries that aren't players
 | 
			
		||||
      */
 | 
			
		||||
-    @Deprecated
 | 
			
		||||
+    // @Deprecated // Paper
 | 
			
		||||
     boolean hasPlayer(@NotNull OfflinePlayer player) throws IllegalArgumentException, IllegalStateException;
 | 
			
		||||
     /**
 | 
			
		||||
      * Checks to see if the specified entry is a member of this team.
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Team {
 | 
			
		||||
      */
 | 
			
		||||
     void setOption(@NotNull Option option, @NotNull OptionStatus status) throws IllegalStateException;
 | 
			
		||||
 
 | 
			
		||||
+    // Paper start
 | 
			
		||||
+    /**
 | 
			
		||||
+     * This puts the specified entity onto this team for the scoreboard.
 | 
			
		||||
+     * <p>
 | 
			
		||||
+     * This will remove the entity from any other team on the scoreboard.
 | 
			
		||||
+     *
 | 
			
		||||
+     * @param entity the entity to add
 | 
			
		||||
+     * @throws IllegalArgumentException if entity is null
 | 
			
		||||
+     * @throws IllegalStateException if this team has been unregistered
 | 
			
		||||
+     * @see #addEntry(String)
 | 
			
		||||
+     */
 | 
			
		||||
+    void addEntity(@NotNull org.bukkit.entity.Entity entity) throws IllegalStateException, IllegalArgumentException;
 | 
			
		||||
+
 | 
			
		||||
+    /**
 | 
			
		||||
+     * Removes the entity from this team.
 | 
			
		||||
+     *
 | 
			
		||||
+     * @param entity the entity to remove
 | 
			
		||||
+     * @return if the entity was on this team
 | 
			
		||||
+     * @throws IllegalArgumentException if entity is null
 | 
			
		||||
+     * @throws IllegalStateException if this team has been unregistered
 | 
			
		||||
+     * @see #removeEntry(String)
 | 
			
		||||
+     */
 | 
			
		||||
+    boolean removeEntity(@NotNull org.bukkit.entity.Entity entity) throws IllegalStateException, IllegalArgumentException;
 | 
			
		||||
+
 | 
			
		||||
+    /**
 | 
			
		||||
+     * Checks to see if the specified entity is a member of this team.
 | 
			
		||||
+     *
 | 
			
		||||
+     * @param entity the entity to search for
 | 
			
		||||
+     * @return true if the entity is a member of this team
 | 
			
		||||
+     * @throws IllegalArgumentException if entity is null
 | 
			
		||||
+     * @throws IllegalStateException if this team has been unregistered
 | 
			
		||||
+     * @see #hasEntry(String)
 | 
			
		||||
+     */
 | 
			
		||||
+    boolean hasEntity(@NotNull org.bukkit.entity.Entity entity) throws IllegalStateException, IllegalArgumentException;
 | 
			
		||||
+    // Paper end
 | 
			
		||||
+
 | 
			
		||||
     /**
 | 
			
		||||
      * Represents an option which may be applied to this team.
 | 
			
		||||
      */
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue