Skip to content

Commit

Permalink
Merge pull request #360 from kezz/more-scheduled-for-removals
Browse files Browse the repository at this point in the history
Annotate more deprecated methods with `ScheduledForRemoval`
  • Loading branch information
kashike committed May 12, 2021
2 parents 074bc35 + a56e545 commit 551ca25
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/src/main/java/net/kyori/adventure/bossbar/BossBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public interface BossBar extends Examinable {
* @deprecated for removal since 4.2.0, use {@link #MIN_PROGRESS}
* @since 4.0.0
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
float MIN_PERCENT = MIN_PROGRESS;
/**
Expand All @@ -79,6 +80,7 @@ public interface BossBar extends Examinable {
* @deprecated for removal since 4.2.0, use {@link #MAX_PROGRESS}
* @since 4.0.0
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
float MAX_PERCENT = MAX_PROGRESS;

Expand Down Expand Up @@ -210,6 +212,7 @@ public interface BossBar extends Examinable {
* @deprecated for removal since 4.2.0, use {@link #progress()}
* @since 4.0.0
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
default float percent() {
return this.progress();
Expand All @@ -226,6 +229,7 @@ default float percent() {
* @deprecated for removal since 4.2.0, use {@link #progress(float)}
* @since 4.0.0
*/
@ApiStatus.ScheduledForRemoval
@Contract("_ -> this")
@Deprecated
default @NonNull BossBar percent(final float progress) {
Expand Down Expand Up @@ -414,7 +418,9 @@ default void bossBarProgressChanged(final @NonNull BossBar bar, final float oldP
* @deprecated for removal since 4.2.0, use {@link #bossBarProgressChanged(BossBar, float, float)}
* @since 4.0.0
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
@SuppressWarnings("DeprecatedIsStillUsed")
default void bossBarPercentChanged(final @NonNull BossBar bar, final float oldProgress, final float newProgress) {
}

Expand Down
8 changes: 8 additions & 0 deletions api/src/main/java/net/kyori/adventure/text/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -1665,6 +1665,7 @@ default boolean hasStyling() {
* @since 4.0.0
* @deprecated for removal since 4.2.0, use {@link #replaceText(Consumer)} or {@link #replaceText(TextReplacementConfig)} instead.
*/
@ApiStatus.ScheduledForRemoval
@Contract(pure = true)
@Deprecated
default @NonNull Component replaceText(final @NonNull String search, final @Nullable ComponentLike replacement) {
Expand All @@ -1680,6 +1681,7 @@ default boolean hasStyling() {
* @since 4.0.0
* @deprecated for removal since 4.2.0, use {@link #replaceText(Consumer)} or {@link #replaceText(TextReplacementConfig)} instead.
*/
@ApiStatus.ScheduledForRemoval
@Contract(pure = true)
@Deprecated
default @NonNull Component replaceText(final @NonNull Pattern pattern, final @NonNull Function<TextComponent.Builder, @Nullable ComponentLike> replacement) {
Expand All @@ -1695,6 +1697,7 @@ default boolean hasStyling() {
* @since 4.0.0
* @deprecated for removal since 4.2.0, use {@link #replaceText(Consumer)} or {@link #replaceText(TextReplacementConfig)} instead.
*/
@ApiStatus.ScheduledForRemoval
@Contract(pure = true)
@Deprecated
default @NonNull Component replaceFirstText(final @NonNull String search, final @Nullable ComponentLike replacement) {
Expand All @@ -1710,6 +1713,7 @@ default boolean hasStyling() {
* @since 4.0.0
* @deprecated for removal since 4.2.0, use {@link #replaceText(Consumer)} or {@link #replaceText(TextReplacementConfig)} instead.
*/
@ApiStatus.ScheduledForRemoval
@Contract(pure = true)
@Deprecated
default @NonNull Component replaceFirstText(final @NonNull Pattern pattern, final @NonNull Function<TextComponent.Builder, @Nullable ComponentLike> replacement) {
Expand All @@ -1726,6 +1730,7 @@ default boolean hasStyling() {
* @since 4.0.0
* @deprecated for removal since 4.2.0, use {@link #replaceText(Consumer)} or {@link #replaceText(TextReplacementConfig)} instead.
*/
@ApiStatus.ScheduledForRemoval
@Contract(pure = true)
@Deprecated
default @NonNull Component replaceText(final @NonNull String search, final @Nullable ComponentLike replacement, final int numberOfReplacements) {
Expand All @@ -1742,6 +1747,7 @@ default boolean hasStyling() {
* @since 4.0.0
* @deprecated for removal since 4.2.0, use {@link #replaceText(Consumer)} or {@link #replaceText(TextReplacementConfig)} instead.
*/
@ApiStatus.ScheduledForRemoval
@Contract(pure = true)
@Deprecated
default @NonNull Component replaceText(final @NonNull Pattern pattern, final @NonNull Function<TextComponent.Builder, @Nullable ComponentLike> replacement, final int numberOfReplacements) {
Expand All @@ -1760,6 +1766,7 @@ default boolean hasStyling() {
* @since 4.0.0
* @deprecated for removal since 4.2.0, use {@link #replaceText(Consumer)} or {@link #replaceText(TextReplacementConfig)} instead.
*/
@ApiStatus.ScheduledForRemoval
@Contract(pure = true)
@Deprecated
default @NonNull Component replaceText(final @NonNull String search, final @Nullable ComponentLike replacement, final @NonNull IntFunction2<PatternReplacementResult> fn) {
Expand All @@ -1778,6 +1785,7 @@ default boolean hasStyling() {
* @since 4.0.0
* @deprecated for removal since 4.2.0, use {@link #replaceText(Consumer)} or {@link #replaceText(TextReplacementConfig)} instead.
*/
@ApiStatus.ScheduledForRemoval
@Contract(pure = true)
@Deprecated
default @NonNull Component replaceText(final @NonNull Pattern pattern, final @NonNull Function<TextComponent.Builder, @Nullable ComponentLike> replacement, final @NonNull IntFunction2<PatternReplacementResult> fn) {
Expand Down

0 comments on commit 551ca25

Please sign in to comment.