Skip to content

Commit fc1c578

Browse files
Aaron1011Deamon5550
authored andcommitted
OCD fixes
1 parent 9e608e5 commit fc1c578

File tree

11 files changed

+75
-58
lines changed

11 files changed

+75
-58
lines changed

src/main/java/org/spongepowered/api/effect/Viewer.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333

3434
/**
3535
* A Viewer is something that sees effects.
36-
* The Viewer class contains methods for spawning particles and playing sound effects.
36+
* The Viewer class contains methods for spawning particles and playing sound
37+
* effects.
3738
*/
3839
public interface Viewer {
3940

@@ -76,7 +77,8 @@ public interface Viewer {
7677
* @param sound The sound to play
7778
* @param position The position to play the sound
7879
* @param volume The volume to play the sound at, usually between 0 and 2
79-
* @param pitch The modulation of the sound to play at, usually between 0 and 2
80+
* @param pitch The modulation of the sound to play at, usually between 0
81+
* and 2
8082
*/
8183
void playSound(SoundType sound, Vector3d position, double volume, double pitch);
8284

@@ -87,8 +89,10 @@ public interface Viewer {
8789
* @param sound The sound to play
8890
* @param position The position to play the sound
8991
* @param volume The volume to play the sound at, usually between 0 and 2
90-
* @param pitch The modulation of the sound to play at, usually between 0 and 2
91-
* @param minVolume The minimum volume to play the sound at, usually between 0 and 2
92+
* @param pitch The modulation of the sound to play at, usually between 0
93+
* and 2
94+
* @param minVolume The minimum volume to play the sound at, usually between
95+
* 0 and 2
9296
*/
9397
void playSound(SoundType sound, Vector3d position, double volume, double pitch, double minVolume);
9498

src/main/java/org/spongepowered/api/effect/particle/ItemParticle.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
import org.spongepowered.api.item.inventory.ItemStackSnapshot;
2929

3030
/**
31-
* Represents a particle effect that needs a item stack to be rendered on the client.
31+
* Represents a particle effect that needs a item stack to be rendered on the
32+
* client.
3233
*/
3334
public interface ItemParticle extends ParticleEffect {
3435

src/main/java/org/spongepowered/api/plugin/Plugin.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@
6363
/**
6464
* A simple dependency string for this mod separated by a ";"
6565
* example:
66-
* <pre>"required-after:Sponge@[1.2.3.2222,);required-after:myLibraryPlugin;after:towny;before:worldguard"</pre>
67-
* supported options:
66+
* <pre>"required-after:Sponge@[1.2.3.2222,);
67+
* required-after:myLibraryPlugin;after:towny;before:worldguard"</pre>
68+
*
69+
* <p>supported options:
6870
* <dl>
6971
* <dt>after</dt>
7072
* <dd>when present this plugin will run after plugin x</dd>
@@ -75,7 +77,7 @@
7577
* <dt>required-before</dt>
7678
* <dd>plugin x must be present, load before plugin x</dd>
7779
* </dl>
78-
* supports maven version ranges after @ in any field
80+
* supports maven version ranges after @ in any field</p>
7981
*
8082
* @return The plugin dependencies
8183
*/

src/main/java/org/spongepowered/api/service/ban/BanService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
* service API (e.g. writing them to a database). In essence, expired bans
4040
* should be treated the same as user-removed bans.
4141
*
42-
* For example, {@link #getBans()} would not include any expired bans,
43-
* and {@link #hasBan(Ban)} would return <code>false</code>.
42+
* <p>For example, {@link #getBans()} would not include any expired bans,
43+
* and {@link #hasBan(Ban)} would return <code>false</code>.</p>
4444
*/
4545
public interface BanService {
4646

src/main/java/org/spongepowered/api/service/economy/Currency.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
import java.math.BigDecimal;
3030

3131
/**
32-
* Represents a form of currency. At least one type of currency is always supported.
33-
* Depending on the provider of the {@link EconomyService}, more currencies may be available.
32+
* Represents a form of currency. At least one type of currency is always
33+
* supported.
34+
*
35+
* <p>Depending on the provider of the {@link EconomyService}, more currencies may be available.</p>
3436
*/
3537
public interface Currency {
3638

@@ -63,7 +65,7 @@ public interface Currency {
6365
*
6466
* <p>Should include the symbol if it is present</p>
6567
*
66-
* @param amount to format
68+
* @param amount The amount to format
6769
* @return String formatted amount
6870
*/
6971
default Text format(BigDecimal amount) {
@@ -73,10 +75,10 @@ default Text format(BigDecimal amount) {
7375
/**
7476
* Formats the given amount using the specified number of fractional digits.
7577
*
76-
* <p>Should include the symbol if it is present</p>
78+
* <p>Should include the symbol if it is present</p>
7779
*
78-
* @param amount
79-
* @param numFractionDigits
80+
* @param amount The amount to format
81+
* @param numFractionDigits The numer of fractional digits to use
8082
* @return String formatted amount.
8183
*/
8284
Text format(BigDecimal amount, int numFractionDigits);

src/main/java/org/spongepowered/api/service/economy/EconomyService.java

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ public interface EconomyService extends ContextualService<Account> {
5858
* Returns the {@link Set} of supported {@link Currency} objects that are
5959
* implemented by this EconomyService.
6060
*
61-
* <p>The economy service provider may only support one currency, in which case
62-
* {@link #getDefaultCurrency()} will be the only member of the set.</p>
61+
* <p>The economy service provider may only support one currency, in which
62+
* case {@link #getDefaultCurrency()} will be the only member of the set.</p>
6363
*
64-
* <p>The set returned is a read-only a view of all currencies available in the
65-
* EconomyService.</p>
64+
* <p>The set returned is a read-only a view of all currencies available in
65+
* the EconomyService.</p>
6666
*
6767
* @return The {@link Set} of all {@link Currency}s
6868
*/
@@ -76,6 +76,18 @@ public interface EconomyService extends ContextualService<Account> {
7676
*/
7777
Optional<UniqueAccount> getAccount(UUID uuid);
7878

79+
/**
80+
* Gets the {@link Account} with the specified identifier, if available.
81+
*
82+
* <p>The returned {@link Account} may be a {@link UniqueAccount} or
83+
* a {@link VirtualAccount}, depending on the implementation.</p>
84+
*
85+
* @param identifier The identifier of the account to get
86+
* @return The {@link VirtualAccount}, if available.
87+
*/
88+
Optional<Account> getAccount(String identifier);
89+
90+
7991
/**
8092
* Attempts to create a {@link UniqueAccount} for the user with the specified {@link UUID}.
8193
*
@@ -90,17 +102,6 @@ public interface EconomyService extends ContextualService<Account> {
90102
*/
91103
Optional<UniqueAccount> createAccount(UUID uuid);
92104

93-
/**
94-
* Gets the {@link Account} with the specified identifier, if available.
95-
*
96-
* <p>The returned {@link Account} may be a {@link UniqueAccount} or
97-
* a {@link VirtualAccount}, depending on the implementation.</p>
98-
*
99-
* @param identifier The identifier of the account to get
100-
* @return The {@link VirtualAccount}, if available.
101-
*/
102-
Optional<Account> getAccount(String identifier);
103-
104105
/**
105106
* Attempts to create a {@link VirtualAccount} with the specified identifier
106107
*

src/main/java/org/spongepowered/api/service/economy/account/Account.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
*/
2525
package org.spongepowered.api.service.economy.account;
2626

27-
import java.math.BigDecimal;
28-
import java.util.Map;
29-
import java.util.Set;
30-
import java.util.UUID;
31-
3227
import org.spongepowered.api.entity.Entity;
3328
import org.spongepowered.api.entity.living.player.User;
3429
import org.spongepowered.api.event.cause.Cause;
@@ -41,16 +36,21 @@
4136
import org.spongepowered.api.service.economy.transaction.TransferResult;
4237
import org.spongepowered.api.text.Text;
4338

39+
import java.math.BigDecimal;
40+
import java.util.Map;
41+
import java.util.Set;
42+
import java.util.UUID;
43+
4444
/**
4545
* Represents an account, which stores amounts of various {@link Currency currencies}.
4646
*
4747
* <p>Accounts come in two varieties: {@link UniqueAccount user accounts} and {@link VirtualAccount} virtual accounts.
4848
*
4949
* Unique accounts are bound to a {@link UUID}, usually of a particular {@link User}'s {@link GameProfile}.
5050
*
51-
* Virtual accounts are identified by a String identifier, which may have any value. They are
52-
* not tied to any {@link Entity}, player or otherwise. Virtual accounts may be used for purposes
53-
* such as bank accounts, non-player {@link Entity} accounts, or other things.</p>
51+
* Virtual accounts are identified by a String identifier, which may have any
52+
* value. They are not tied to any {@link Entity}, player or otherwise. Virtual
53+
* accounts may be used for purposes such as bank accounts, non-player {@link Entity} accounts, or other things.</p>
5454
*/
5555
public interface Account extends Contextual {
5656

@@ -116,8 +116,8 @@ default boolean hasBalance(Currency currency) {
116116
* Returns a {@link BigDecimal} representative of the balance stored within this
117117
* {@link Account} for the {@link Currency} given and the set of {@link Context}s.
118118
*
119-
* <p>The default result when the account does not have a balance of the given
120-
* {@link Currency} should be {@link BigDecimal#ZERO}.</p>
119+
* <p>The default result when the account does not have a balance of the
120+
* given {@link Currency} should be {@link BigDecimal#ZERO}.</p>
121121
*
122122
* <p>The balance may be unavailable depending on the set of {@link Context}s used.</p>
123123
*
@@ -132,8 +132,8 @@ default boolean hasBalance(Currency currency) {
132132
* Returns a {@link BigDecimal} representative of the balance stored within this
133133
* {@link Account} for the {@link Currency} given, with the current active contexts.
134134
*
135-
* <p>The default result when the account does not have a balance of the given
136-
* {@link Currency} will be {@link #getDefaultBalance(Currency)}.</p>
135+
* <p>The default result when the account does not have a balance of the
136+
* given {@link Currency} will be {@link #getDefaultBalance(Currency)}.</p>
137137
*
138138
* @param currency a {@link Currency} to check the balance of
139139
*
@@ -186,8 +186,8 @@ default Map<Currency, BigDecimal> getBalances() {
186186
}
187187

188188
/**
189-
* Sets the balance for this account to the specified amount for the specified
190-
* {@link Currency}, with the specified set of {@link Context}s.
189+
* Sets the balance for this account to the specified amount for
190+
* the specified {@link Currency}, with the specified set of {@link Context}s.
191191
*
192192
* <p>Negative balances may or may not be supported depending on
193193
* the {@link Currency} specified and the implementation.</p>
@@ -202,8 +202,8 @@ default Map<Currency, BigDecimal> getBalances() {
202202
TransactionResult setBalance(Currency currency, BigDecimal amount, Cause cause, Set<Context> contexts);
203203

204204
/**
205-
* Sets the balance for this account to the specified amount for the specified
206-
* {@link Currency}, with the current active {@link Context}s.
205+
* Sets the balance for this account to the specified amount for the
206+
* specified {@link Currency}, with the current active {@link Context}s.
207207
*
208208
* <p>Negative balances may or may not be supported depending on
209209
* the {@link Currency} specified and the implementation.</p>
@@ -229,8 +229,8 @@ default TransactionResult setBalance(Currency currency, BigDecimal amount, Cause
229229
TransactionResult resetBalances(Cause cause, Set<Context> contexts);
230230

231231
/**
232-
* Resets the balances for all {@link Currency}s used on this account to their
233-
* default values ({@link #getDefaultBalance(Currency)}), using the current active {@link Context}
232+
* Resets the balances for all {@link Currency}s used on this account to
233+
* their default values ({@link #getDefaultBalance(Currency)}), using the current active {@link Context}.
234234
*
235235
* @param cause The {@link Cause} for the transaction
236236
*

src/main/java/org/spongepowered/api/service/economy/transaction/ResultType.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public enum ResultType {
3333

3434
/**
35-
* Transaction finished with no errors
35+
* Transaction finished with no errors.
3636
*/
3737
SUCCESS,
3838

@@ -52,7 +52,8 @@ public enum ResultType {
5252
ACCOUNT_NO_FUNDS,
5353

5454
/**
55-
* The account would be put past it's maximum capacity, so the transaction failed.
55+
* The account would be put past it's maximum capacity, so the transaction
56+
* failed.
5657
*/
5758
ACCOUNT_NO_SPACE
5859
}

src/main/java/org/spongepowered/api/service/economy/transaction/TransactionResult.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ public interface TransactionResult {
6767
Set<Context> getContexts();
6868

6969
/**
70-
* Get the {@link ResultType} of this transaction
70+
* Get the {@link ResultType} of this transaction.
71+
*
7172
* @return resultType
7273
*/
7374
ResultType getResult();
7475

7576
/**
76-
* Returns the {@link TransactionType} of this result
77+
* Returns the {@link TransactionType} of this result.
7778
*
7879
* @return type of Transaction
7980
*/

src/main/java/org/spongepowered/api/service/whitelist/WhitelistService.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,30 @@ public interface WhitelistService {
4646
Collection<GameProfile> getWhitelistedProfiles();
4747

4848
/**
49-
* Gets whether the specified {@link GameProfile} is present on this whitelist.
49+
* Gets whether the specified {@link GameProfile} is present on this
50+
* whitelist.
5051
*
5152
* @param profile The game profile to check for
52-
* @return Whether the specified {@link GameProfile} is present on this whitelist
53+
* @return Whether the specified {@link GameProfile} is present on this
54+
* whitelist
5355
*/
5456
boolean isWhitelisted(GameProfile profile);
5557

5658
/**
5759
* Adds the specified {@link GameProfile} to this whitelist.
5860
*
5961
* @param profile The game profile to add
60-
* @return Whether the specified {@link GameProfile} was already present on this whitelist
62+
* @return Whether the specified {@link GameProfile} was already present on
63+
* this whitelist
6164
*/
6265
boolean addProfile(GameProfile profile);
6366

6467
/**
6568
* Removes the specified {@link GameProfile} from this whitelist, if present.
6669
*
6770
* @param profile The game profile to remove
68-
* @return Whether the specified {@link GameProfile} was present before removal
71+
* @return Whether the specified {@link GameProfile} was present before
72+
* removal
6973
*/
7074
boolean removeProfile(GameProfile profile);
7175
}

0 commit comments

Comments
 (0)