Skip to content

Commit 9f00461

Browse files
committed
Update a whole lot of deprecated annotations
1 parent bb1beda commit 9f00461

File tree

113 files changed

+785
-710
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+785
-710
lines changed

paper-api/src/main/java/com/destroystokyo/paper/NamespacedTag.java

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.util.UUID;
66
import java.util.regex.Pattern;
77
import org.bukkit.plugin.Plugin;
8+
import org.jetbrains.annotations.ApiStatus;
89
import org.jetbrains.annotations.NotNull;
910

1011
/**
@@ -126,6 +127,7 @@ public String toString() {
126127
* @deprecated should never be used by plugins, for internal use only!!
127128
*/
128129
@Deprecated
130+
@ApiStatus.Internal
129131
public static NamespacedTag randomKey() {
130132
return new NamespacedTag(BUKKIT, UUID.randomUUID().toString());
131133
}

paper-api/src/main/java/com/destroystokyo/paper/event/entity/SkeletonHorseTrapEvent.java

-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.destroystokyo.paper.event.entity;
22

3-
import com.google.common.collect.ImmutableList;
43
import java.util.List;
54
import org.bukkit.entity.HumanEntity;
65
import org.bukkit.entity.SkeletonHorse;
@@ -21,12 +20,6 @@ public class SkeletonHorseTrapEvent extends EntityEvent implements Cancellable {
2120
private final List<HumanEntity> eligibleHumans;
2221
private boolean cancelled;
2322

24-
@Deprecated
25-
@ApiStatus.Internal
26-
public SkeletonHorseTrapEvent(final SkeletonHorse horse) {
27-
this(horse, ImmutableList.of());
28-
}
29-
3023
@ApiStatus.Internal
3124
public SkeletonHorseTrapEvent(final SkeletonHorse horse, final List<HumanEntity> eligibleHumans) {
3225
super(horse);

paper-api/src/main/java/com/destroystokyo/paper/event/player/IllegalPacketEvent.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* @deprecated Not used
1212
*/
13-
@Deprecated(since = "1.16.4")
13+
@Deprecated(since = "1.16.4", forRemoval = true)
1414
public class IllegalPacketEvent extends PlayerEvent {
1515

1616
private static final HandlerList HANDLER_LIST = new HandlerList();

paper-api/src/main/java/com/destroystokyo/paper/event/player/PlayerClientOptionsChangeEvent.java

-14
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,6 @@ public class PlayerClientOptionsChangeEvent extends PlayerEvent {
3030
private final boolean textFilteringEnabled;
3131
private final ParticleVisibility particleVisibility;
3232

33-
@Deprecated
34-
public PlayerClientOptionsChangeEvent(final Player player, final String locale, final int viewDistance, final ChatVisibility chatVisibility, final boolean chatColors, final SkinParts skinParts, final MainHand mainHand) {
35-
super(player);
36-
this.locale = locale;
37-
this.viewDistance = viewDistance;
38-
this.chatVisibility = chatVisibility;
39-
this.chatColors = chatColors;
40-
this.skinparts = skinParts;
41-
this.mainHand = mainHand;
42-
this.allowsServerListings = false;
43-
this.textFilteringEnabled = false;
44-
this.particleVisibility = ParticleVisibility.ALL;
45-
}
46-
4733
@ApiStatus.Internal
4834
public PlayerClientOptionsChangeEvent(final Player player, final Map<ClientOption<?>, ?> options) {
4935
super(player);

paper-api/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java

-6
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ public class ProfileWhitelistVerifyEvent extends Event {
5050
private boolean whitelisted;
5151
private @Nullable Component kickMessage;
5252

53-
@Deprecated
54-
@ApiStatus.Internal
55-
public ProfileWhitelistVerifyEvent(final PlayerProfile profile, final boolean whitelistEnabled, final boolean whitelisted, final boolean isOp, final @Nullable String kickMessage) {
56-
this(profile, whitelistEnabled, whitelisted, isOp, kickMessage == null ? null : LegacyComponentSerializer.legacySection().deserialize(kickMessage));
57-
}
58-
5953
@ApiStatus.Internal
6054
public ProfileWhitelistVerifyEvent(final PlayerProfile profile, final boolean whitelistEnabled, final boolean whitelisted, final boolean isOp, final @Nullable Component kickMessage) {
6155
this.profile = profile;

paper-api/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java

-12
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,6 @@ public class PaperServerListPingEvent extends ServerListPingEvent implements Can
5555
private boolean originalPlayerCount = true;
5656
private Object[] players;
5757

58-
@Deprecated
59-
@ApiStatus.Internal
60-
public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull String motd, int numPlayers, int maxPlayers,
61-
@NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {
62-
super("", client.getAddress().getAddress(), motd, numPlayers, maxPlayers);
63-
this.client = client;
64-
this.numPlayers = numPlayers;
65-
this.version = version;
66-
this.protocolVersion = protocolVersion;
67-
setServerIcon(favicon);
68-
}
69-
7058
@ApiStatus.Internal
7159
public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull net.kyori.adventure.text.Component motd, int numPlayers, int maxPlayers,
7260
@NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {

paper-api/src/main/java/org/bukkit/Art.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ private static Art getArt(@NotNull String key) {
109109
* Get the ID of this painting.
110110
*
111111
* @return The ID of this painting
112-
* @deprecated Magic value
112+
* @deprecated Magic value that is based on inconsistent, data-driven registry
113113
*/
114-
@Deprecated(since = "1.6.2")
114+
@Deprecated(since = "1.6.2", forRemoval = true)
115115
int getId();
116116

117117
// Paper start - deprecate getKey
@@ -162,9 +162,9 @@ private static Art getArt(@NotNull String key) {
162162
*
163163
* @param id The ID
164164
* @return The painting
165-
* @deprecated Magic value
165+
* @deprecated Magic value that is based on inconsistent, data-driven registry
166166
*/
167-
@Deprecated(since = "1.6.2")
167+
@Deprecated(since = "1.6.2", forRemoval = true)
168168
@Nullable
169169
static Art getById(int id) {
170170
for (Art art : Registry.ART) {

paper-api/src/main/java/org/bukkit/Bukkit.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,6 @@ public static WorldBorder createWorldBorder() {
930930
* @param id the id of the map to get
931931
* @return a map view if it exists, or null otherwise
932932
*/
933-
// @Deprecated(since = "1.6.2") // Paper - Not a magic value
934933
@Nullable
935934
public static MapView getMap(int id) {
936935
return server.getMap(id);
@@ -1392,7 +1391,7 @@ public static void setSpawnRadius(int value) {
13921391
* @return true if the server should send a preview, false otherwise
13931392
* @deprecated chat previews have been removed
13941393
*/
1395-
@Deprecated(since = "1.19.3")
1394+
@Deprecated(since = "1.19.3", forRemoval = true)
13961395
public static boolean shouldSendChatPreviews() {
13971396
return server.shouldSendChatPreviews();
13981397
}
@@ -1515,7 +1514,6 @@ public static int broadcast(@NotNull String message, @NotNull String permission)
15151514
* @return an offline player
15161515
* @see #getOfflinePlayer(java.util.UUID)
15171516
*/
1518-
// @Deprecated(since = "1.7.5") // Paper
15191517
@NotNull
15201518
public static OfflinePlayer getOfflinePlayer(@NotNull String name) {
15211519
return server.getOfflinePlayer(name);

paper-api/src/main/java/org/bukkit/ChunkSnapshot.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public interface ChunkSnapshot {
6565
* @return 0-15
6666
* @deprecated Magic value
6767
*/
68-
@Deprecated(since = "1.6.2")
68+
@Deprecated(since = "1.6.2", forRemoval = true)
6969
int getData(int x, int y, int z);
7070

7171
/**

paper-api/src/main/java/org/bukkit/Effect.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -27,70 +27,70 @@ public enum Effect {
2727
* @deprecated no longer exists
2828
* @see Sound#BLOCK_WOODEN_DOOR_OPEN
2929
*/
30-
@Deprecated(since = "1.19.3")
30+
@Deprecated(since = "1.19.3", forRemoval = true)
3131
DOOR_TOGGLE(1006, Type.SOUND),
3232
/**
3333
* Sound of a door opening.
3434
* @deprecated no longer exists
3535
* @see Sound#BLOCK_IRON_DOOR_OPEN
3636
*/
37-
@Deprecated(since = "1.19.3")
37+
@Deprecated(since = "1.19.3", forRemoval = true)
3838
IRON_DOOR_TOGGLE(1005, Type.SOUND),
3939
/**
4040
* Sound of a trapdoor opening.
4141
* @deprecated no longer exists
4242
* @see Sound#BLOCK_WOODEN_TRAPDOOR_OPEN
4343
*/
44-
@Deprecated(since = "1.19.3")
44+
@Deprecated(since = "1.19.3", forRemoval = true)
4545
TRAPDOOR_TOGGLE(1007, Type.SOUND),
4646
/**
4747
* Sound of a door opening.
4848
* @deprecated no longer exists
4949
* @see Sound#BLOCK_IRON_TRAPDOOR_OPEN
5050
*/
51-
@Deprecated(since = "1.19.3")
51+
@Deprecated(since = "1.19.3", forRemoval = true)
5252
IRON_TRAPDOOR_TOGGLE(1037, Type.SOUND),
5353
/**
5454
* Sound of a door opening.
5555
* @deprecated no longer exists
5656
* @see Sound#BLOCK_FENCE_GATE_OPEN
5757
*/
58-
@Deprecated(since = "1.19.3")
58+
@Deprecated(since = "1.19.3", forRemoval = true)
5959
FENCE_GATE_TOGGLE(1008, Type.SOUND),
6060
/**
6161
* Sound of a door closing.
6262
* @deprecated no longer exists
6363
* @see Sound#BLOCK_WOODEN_DOOR_CLOSE
6464
*/
65-
@Deprecated(since = "1.19.3")
65+
@Deprecated(since = "1.19.3", forRemoval = true)
6666
DOOR_CLOSE(1012, Type.SOUND),
6767
/**
6868
* Sound of a door closing.
6969
* @deprecated no longer exists
7070
* @see Sound#BLOCK_IRON_DOOR_CLOSE
7171
*/
72-
@Deprecated(since = "1.19.3")
72+
@Deprecated(since = "1.19.3", forRemoval = true)
7373
IRON_DOOR_CLOSE(1011, Type.SOUND),
7474
/**
7575
* Sound of a trapdoor closing.
7676
* @deprecated no longer exists
7777
* @see Sound#BLOCK_WOODEN_TRAPDOOR_CLOSE
7878
*/
79-
@Deprecated(since = "1.19.3")
79+
@Deprecated(since = "1.19.3", forRemoval = true)
8080
TRAPDOOR_CLOSE(1013, Type.SOUND),
8181
/**
8282
* Sound of a door closing.
8383
* @deprecated no longer exists
8484
* @see Sound#BLOCK_IRON_TRAPDOOR_CLOSE
8585
*/
86-
@Deprecated(since = "1.19.3")
86+
@Deprecated(since = "1.19.3", forRemoval = true)
8787
IRON_TRAPDOOR_CLOSE(1036, Type.SOUND),
8888
/**
8989
* Sound of a door closing.
9090
* @deprecated no longer exists
9191
* @see Sound#BLOCK_FENCE_GATE_CLOSE
9292
*/
93-
@Deprecated(since = "1.19.3")
93+
@Deprecated(since = "1.19.3", forRemoval = true)
9494
FENCE_GATE_CLOSE(1014, Type.SOUND),
9595
/**
9696
* Sound of fire being extinguished.

0 commit comments

Comments
 (0)