Skip to content

Commit a1109b0

Browse files
committed
Add @since tags
1 parent e0f1b98 commit a1109b0

35 files changed

Lines changed: 336 additions & 3 deletions

plugin/src/main/java/net/milkbowl/vault/Vault.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
/**
77
* A compatibility class used to mitigate issues caused by certain plugins that check the instance
88
* of the plugin for validation, potentially leading to class not found errors.
9+
*
10+
* @since 2.2.1
911
*/
1012
@ApiStatus.Internal
1113
public class Vault extends JavaPlugin {

plugin/src/main/java/net/thenextlvl/service/plugin/placeholder/economy/UnlockedEconomyPlaceholderStore.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
/**
1212
* <a href="https://github.com/TheNewEconomy/VaultUnlocked/blob/master/src/net/milkbowl/vault/papi/EconomyPlaceholders.java">Source</a>
13+
*
14+
* @since 2.6.1
1315
*/
1416
public final class UnlockedEconomyPlaceholderStore extends PlaceholderStore<Economy> {
1517
private static final String PLUGIN_NAME = "VaultUnlocked";

src/main/java/net/thenextlvl/service/Controller.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public interface Controller {
88
* Retrieves the plugin associated with the controller.
99
*
1010
* @return the plugin instance linked to the controller.
11+
* @since 2.2.1
1112
*/
1213
@Contract(pure = true)
1314
Plugin getPlugin();
@@ -16,6 +17,7 @@ public interface Controller {
1617
* Retrieves the name associated with the controller.
1718
*
1819
* @return the name of the controller.
20+
* @since 2.2.1
1921
*/
2022
@Contract(pure = true)
2123
String getName();

src/main/java/net/thenextlvl/service/capability/Capability.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* <p>
1010
* Implementations of this interface can be used in conjunction with capability
1111
* providers or related systems to organize and query available functionalities.
12+
*
13+
* @since 2.2.0
1214
*/
1315
@FunctionalInterface
1416
public interface Capability {

src/main/java/net/thenextlvl/service/capability/CapabilityException.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* An exception that indicates a problem related to a specific {@link Capability}.
77
* This exception is typically thrown when there is an issue or unsupported operation
88
* associated with a particular capability in the system.
9+
*
10+
* @since 2.2.0
911
*/
1012
public class CapabilityException extends RuntimeException {
1113
private final Capability capability;
@@ -29,6 +31,7 @@ public CapabilityException(final Plugin plugin, final Capability capability) {
2931
* @param message the detail message, providing additional information about the exception.
3032
* @param capability the {@link Capability} instance associated with this exception,
3133
* indicating the capability that caused the issue.
34+
* @since 3.0.0
3235
*/
3336
public CapabilityException(final String message, final Capability capability) {
3437
super(message);
@@ -40,6 +43,7 @@ public CapabilityException(final String message, final Capability capability) {
4043
*
4144
* @return the {@link Capability} instance that caused this exception,
4245
* representing a specific feature or limitation.
46+
* @since 2.2.0
4347
*/
4448
public Capability getCapability() {
4549
return this.capability;

src/main/java/net/thenextlvl/service/capability/CapabilityProvider.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
* capabilities and provides mechanisms to check whether the provider supports individual or multiple capabilities.
1313
*
1414
* @param <T> the type of {@link Capability} supported by this provider
15+
* @since 2.2.0
1516
*/
1617
public interface CapabilityProvider<T extends Capability> {
1718
/**
1819
* Retrieves an unmodifiable set of all available capabilities supported by the capability provider.
1920
*
2021
* @return an unmodifiable {@link Set} containing the supported {@link T capability} values
22+
* @since 2.2.0
2123
*/
2224
@Unmodifiable
2325
Set<T> getCapabilities();
@@ -27,6 +29,7 @@ public interface CapabilityProvider<T extends Capability> {
2729
*
2830
* @param capabilities the collection of {@link T capability} instances to verify for support
2931
* @return {@code true} if all the specified capabilities are supported; {@code false} otherwise
32+
* @since 2.2.0
3033
*/
3134
boolean hasCapabilities(Collection<T> capabilities);
3235

@@ -35,6 +38,7 @@ public interface CapabilityProvider<T extends Capability> {
3538
*
3639
* @param capability the {@link T capability} to verify for support
3740
* @return {@code true} if the given capability is supported; {@code false} otherwise
41+
* @since 2.2.0
3842
*/
3943
boolean hasCapability(T capability);
4044
}

src/main/java/net/thenextlvl/service/character/Character.java

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* <p>
1919
* A character may or may not be backed by a real server entity, depending on
2020
* provider capabilities and spawn state.
21+
*
22+
* @since 2.2.0
2123
*/
2224
public interface Character {
2325
/**
@@ -26,20 +28,23 @@ public interface Character {
2628
* @param location the {@code Location} to which the character will be teleported
2729
* @return a {@code CompletableFuture} that resolves to {@code true} if the teleportation was
2830
* successful, or {@code false} otherwise
31+
* @since 2.2.0
2932
*/
3033
CompletableFuture<Boolean> teleportAsync(Location location);
3134

3235
/**
3336
* Retrieves the name of the character.
3437
*
3538
* @return the name of the character
39+
* @since 3.0.0
3640
*/
3741
String getName();
3842

3943
/**
4044
* Checks if this character is persistent.
4145
*
4246
* @return {@code true} if this character is persistent, {@code false} otherwise
47+
* @since 3.0.0
4348
*/
4449
boolean isPersistent();
4550

@@ -48,27 +53,31 @@ public interface Character {
4853
*
4954
* @param persistent {@code true} if this character should be persistent, {@code false} otherwise
5055
* @return {@code true} if the persistence was changed, {@code false} otherwise
56+
* @since 3.0.0
5157
*/
5258
boolean setPersistent(boolean persistent);
5359

5460
/**
5561
* Persists this character.
5662
*
5763
* @return {@code true} if the character was persisted, {@code false} otherwise
64+
* @since 3.0.0
5865
*/
5966
boolean persist();
6067

6168
/**
6269
* Retrieves the display name of the character.
6370
*
6471
* @return the {@code Component} representing the display name of the character
72+
* @since 2.2.0
6573
*/
6674
Component getDisplayName();
6775

6876
/**
6977
* Retrieves the type of entity associated with the character.
7078
*
7179
* @return the entity type of the character
80+
* @since 2.2.0
7281
*/
7382
EntityType getType();
7483

@@ -77,6 +86,7 @@ public interface Character {
7786
*
7887
* @return the current location, or an empty {@code Optional} if it is not
7988
* available
89+
* @since 3.0.0
8090
*/
8191
Optional<Location> getLocation();
8292

@@ -85,6 +95,7 @@ public interface Character {
8595
*
8696
* @return the current world, or an empty {@code Optional} if it is not
8797
* available
98+
* @since 3.0.0
8899
*/
89100
Optional<World> getWorld();
90101

@@ -98,13 +109,15 @@ public interface Character {
98109
*
99110
* @return an {@code Optional} containing the associated entity, or an empty {@code Optional}
100111
* if no entity is associated with the character
112+
* @since 3.0.0
101113
*/
102114
Optional<Entity> getEntity();
103115

104116
/**
105117
* Retrieves an unmodifiable set of players currently tracking this character.
106118
*
107119
* @return the players currently tracking this character
120+
* @since 3.0.0
108121
*/
109122
@Unmodifiable
110123
Set<Player> getTrackedBy();
@@ -114,6 +127,7 @@ public interface Character {
114127
* of this character.
115128
*
116129
* @return the configured viewers of this character
130+
* @since 3.0.0
117131
*/
118132
@Unmodifiable
119133
Set<Player> getViewers();
@@ -123,6 +137,7 @@ public interface Character {
123137
*
124138
* @param player the player to add
125139
* @return {@code true} if the viewer was added, {@code false} otherwise
140+
* @since 3.0.0
126141
*/
127142
boolean addViewer(Player player);
128143

@@ -131,6 +146,7 @@ public interface Character {
131146
*
132147
* @param players the players to add
133148
* @return {@code true} if any viewers were added, {@code false} otherwise
149+
* @since 3.0.0
134150
*/
135151
boolean addViewers(Collection<Player> players);
136152

@@ -139,6 +155,7 @@ public interface Character {
139155
*
140156
* @param player the player to check
141157
* @return {@code true} if the player is tracking this character, {@code false} otherwise
158+
* @since 3.0.0
142159
*/
143160
boolean isTrackedBy(Player player);
144161

@@ -148,13 +165,15 @@ public interface Character {
148165
* @param player the player to check
149166
* @return {@code true} if the player currently qualifies to see this
150167
* character, {@code false} otherwise
168+
* @since 3.0.0
151169
*/
152170
boolean canSee(Player player);
153171

154172
/**
155173
* Checks if this character is visible by default.
156174
*
157175
* @return {@code true} if this character is visible by default, {@code false} otherwise
176+
* @since 3.0.0
158177
*/
159178
boolean isVisibleByDefault();
160179

@@ -163,6 +182,7 @@ public interface Character {
163182
*
164183
* @param player the player to remove
165184
* @return {@code true} if the viewer was removed, {@code false} otherwise
185+
* @since 3.0.0
166186
*/
167187
boolean removeViewer(Player player);
168188

@@ -171,20 +191,23 @@ public interface Character {
171191
*
172192
* @param players the players to remove
173193
* @return {@code true} if any viewers were removed, {@code false} otherwise
194+
* @since 3.0.0
174195
*/
175196
boolean removeViewers(Collection<Player> players);
176197

177198
/**
178199
* Retrieves the display range of this character.
179200
*
180201
* @return the display range
202+
* @since 3.0.0
181203
*/
182204
double getDisplayRange();
183205

184206
/**
185207
* Sets the display range of this character.
186208
*
187209
* @param range the new display range
210+
* @since 3.0.0
188211
*/
189212
void setDisplayRange(double range);
190213

@@ -193,48 +216,55 @@ public interface Character {
193216
*
194217
* @param visible {@code true} if this character should be visible by default, {@code false} otherwise
195218
* @return {@code true} if the visibility was changed, {@code false} otherwise
219+
* @since 3.0.0
196220
*/
197221
boolean setVisibleByDefault(boolean visible);
198222

199223
/**
200224
* Despawns the character, effectively removing it from the world or rendering it inactive.
201225
*
202226
* @return {@code true} if the character was successfully despawned, otherwise {@code false}
227+
* @since 2.2.0
203228
*/
204229
boolean despawn();
205230

206231
/**
207232
* Checks if the character is collidable, meaning it can interact physically with other entities.
208233
*
209234
* @return {@code true} if the character is collidable, otherwise {@code false}
235+
* @since 2.2.0
210236
*/
211237
boolean isCollidable();
212238

213239
/**
214240
* Checks if the character is invulnerable.
215241
*
216242
* @return {@code true} if the character is invulnerable, otherwise {@code false}
243+
* @since 2.2.0
217244
*/
218245
boolean isInvulnerable();
219246

220247
/**
221248
* Checks if the character is currently spawned in the world.
222249
*
223250
* @return {@code true} if the character is spawned, otherwise {@code false}
251+
* @since 2.2.0
224252
*/
225253
boolean isSpawned();
226254

227255
/**
228256
* Checks whether the tablist entry for the character is currently hidden.
229257
*
230258
* @return {@code true} if the tablist entry is hidden, otherwise {@code false}
259+
* @since 2.2.0
231260
*/
232261
boolean isTablistEntryHidden();
233262

234263
/**
235264
* Respawns the character, bringing it back to the world if it was previously despawned.
236265
*
237266
* @return {@code true} if the character was successfully respawned, otherwise {@code false}
267+
* @since 2.2.0
238268
*/
239269
boolean respawn();
240270

@@ -243,26 +273,31 @@ public interface Character {
243273
*
244274
* @param location the {@code Location} where the character will be spawned
245275
* @return {@code true} if the character was successfully spawned, otherwise {@code false}
276+
* @since 2.2.0
246277
*/
247278
boolean spawn(Location location);
248279

249280
/**
250281
* Adjusts the character's orientation to face the given entity.
251282
*
252283
* @param entity the {@code Entity} that the character should face
284+
* @since 2.2.0
253285
*/
254286
void lookAt(Entity entity);
255287

256288
/**
257289
* Adjusts the character's orientation to face the specified location.
258290
*
259291
* @param location the {@code Location} that the character should face
292+
* @since 2.2.0
260293
*/
261294
void lookAt(Location location);
262295

263296
/**
264297
* Permanently removes the character, rendering it inaccessible and removing all associated data.
265298
* After invoking this method, the character can't be respawned or interacted with.
299+
*
300+
* @since 2.2.0
266301
*/
267302
void remove();
268303

@@ -271,27 +306,31 @@ public interface Character {
271306
* with other entities in the world.
272307
*
273308
* @param collidable {@code true} to make the character collidable, allowing physical interactions
309+
* @since 2.2.0
274310
*/
275311
void setCollidable(boolean collidable);
276312

277313
/**
278314
* Sets the display name for the character.
279315
*
280316
* @param displayName the {@code Component} representing the new display name to be set
317+
* @since 2.2.0
281318
*/
282319
void setDisplayName(Component displayName);
283320

284321
/**
285322
* Sets whether the character should be invulnerable.
286323
*
287324
* @param invulnerable {@code true} if the character should be invulnerable, {@code false} otherwise
325+
* @since 2.2.0
288326
*/
289327
void setInvulnerable(boolean invulnerable);
290328

291329
/**
292330
* Sets the visibility state of the character's tablist entry.
293331
*
294332
* @param hidden {@code true} to hide the tablist entry, {@code false} to make it visible
333+
* @since 2.2.0
295334
*/
296335
void setTablistEntryHidden(boolean hidden);
297336
}

0 commit comments

Comments
 (0)