Skip to content

Commit

Permalink
Fix some OCD issues
Browse files Browse the repository at this point in the history
ref #1000
  • Loading branch information
kashike committed Nov 29, 2016
1 parent 87ef7be commit 871fcd1
Show file tree
Hide file tree
Showing 83 changed files with 328 additions and 220 deletions.
1 change: 1 addition & 0 deletions checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<suppressions>
<suppress checks="JavadocMethod" files="^src[\\/]test[\\/]java"/>
<suppress checks="Indentation" files="package-info\.java"/>
<suppress checks="AbbreviationAsWordInName" files="AI"/>
<suppress checks="AbbreviationAsWordInName" files="TNT"/>
<suppress checks="AbbreviationAsWordInName" files="PVP"/>
<suppress checks="AbbreviationAsWordInName" files="PEBKAC"/>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/spongepowered/api/GameRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ default <T extends CatalogType> Collection<T> getAllForSponge(Class<T> typeClass
* @param registryModule The registry module
* @param <T> The type of dummy
* @throws IllegalArgumentException If there is a module already registered
* @throws UnsupportedOperationException If the
* @throws RegistryModuleAlreadyRegisteredException If the module is already registered
* @throws UnsupportedOperationException If an attempt is made to register a module for an API catalog
*/
<T extends CatalogType> GameRegistry registerModule(Class<T> catalogClass, CatalogRegistryModule<T> registryModule)
throws IllegalArgumentException, RegistryModuleAlreadyRegisteredException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface Chest extends TileEntityCarrier {

/**
* Returns the inventory representing the combination of this chest and its neighbor
* (which form a double chest), if availab le.
* (which form a double chest), if available.
*
* <p>If this chest is not part of a double chest, then this method will return {@link Optional#empty()}.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public interface CommandCallable {
CommandResult process(CommandSource source, String arguments) throws CommandException;

/**
* Get a list of suggestions based on input.
* Gets a list of suggestions based on input.
*
* <p>If a suggestion is chosen by the user, it will replace the last
* word.</p>
Expand All @@ -84,7 +84,7 @@ public interface CommandCallable {
boolean testPermission(CommandSource source);

/**
* Get a short one-line description of this command.
* Gets a short one-line description of this command.
*
* <p>The help system may display the description in the command list.</p>
*
Expand All @@ -94,7 +94,7 @@ public interface CommandCallable {
Optional<Text> getShortDescription(CommandSource source);

/**
* Get a longer formatted help message about this command.
* Gets a longer formatted help message about this command.
*
* <p>It is recommended to use the default text color and style. Sections
* with text actions (e.g. hyperlinks) should be underlined.</p>
Expand All @@ -111,7 +111,7 @@ public interface CommandCallable {
Optional<Text> getHelp(CommandSource source);

/**
* Get the usage string of this command.
* Gets the usage string of this command.
*
* <p>A usage string may look like
* {@code [-w &lt;world&gt;] &lt;var1&gt; &lt;var2&gt;}.</p>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/spongepowered/api/command/CommandManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,30 +112,30 @@ public interface CommandManager extends Dispatcher {
Optional<CommandMapping> removeMapping(CommandMapping mapping);

/**
* Get a set of plugin containers that have commands registered.
* Gets a set of plugin containers that have commands registered.
*
* @return A set of plugin containers
*/
Set<PluginContainer> getPluginContainers();

/**
* Get a set of commands owned by the given plugin instance.
* Gets a set of commands owned by the given plugin instance.
*
* @param instance The plugin instance
* @return A set of mappings
*/
Set<CommandMapping> getOwnedBy(Object instance);

/**
* Get the owner of a CommandMapping, if any is present
* Gets the owner of a CommandMapping, if any is present
*
* @param mapping The mapping to get an owner for
* @return The owner, if present.
*/
Optional<PluginContainer> getOwner(CommandMapping mapping);

/**
* Get the number of registered aliases.
* Gets the number of registered aliases.
*
* @return The number of aliases
*/
Expand All @@ -155,7 +155,7 @@ public interface CommandManager extends Dispatcher {
CommandResult process(CommandSource source, String arguments);

/**
* Get a list of suggestions based on input.
* Gets a list of suggestions based on input.
*
* <p>If a suggestion is chosen by the user, it will replace the last
* word.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
public interface CommandMapping {

/**
* Get the primary alias.
* Gets the primary alias.
*
* @return The primary alias
*/
String getPrimaryAlias();

/**
* Get an immutable list of all aliases.
* Gets an immutable list of all aliases.
*
* <p>The returned list must contain at least one entry, of which one must
* be the one returned by {@link #getPrimaryAlias()}.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public <T> Collection<T> getAll(String key) {
}

/**
* Get all values for the given argument. May return an empty list if no values are present.
* Gets all values for the given argument. May return an empty list if no values are present.
*
* @param key The key to get values for
* @param <T> the type of value to get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public Builder setAcceptsArbitraryLongFlags(boolean acceptsArbitraryLongFlags) {
}

/**
* Set how long flags that are not registered should be handled when encountered.
* Sets how long flags that are not registered should be handled when encountered.
*
* @param behavior The behavior to use
* @return this
Expand All @@ -458,7 +458,7 @@ public Builder setUnknownLongFlagBehavior(UnknownFlagBehavior behavior) {
}

/**
* Set how long flags that are not registered should be handled when encountered.
* Sets how long flags that are not registered should be handled when encountered.
*
* @param behavior The behavior to use
* @return this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static final class Builder {
Builder() {}

/**
* Set the permission that will be checked before using this command.
* Sets the permission that will be checked before using this command.
*
* @param permission The permission to check
* @return this
Expand All @@ -119,7 +119,7 @@ public Builder permission(String permission) {
}

/**
* Set the callback that will handle this command's execution.
* Sets the callback that will handle this command's execution.
*
* @param executor The executor that will be called with this command's parsed arguments
* @return this
Expand Down Expand Up @@ -206,7 +206,7 @@ public Builder extendedDescription(@Nullable Text extendedDescription) {
}

/**
* Set the argument specification for this command.
* Sets the argument specification for this command.
* Generally, for a multi-argument command the {@link GenericArguments#seq(CommandElement...)} method is used to parse a sequence of args
*
* @see GenericArguments
Expand All @@ -220,7 +220,7 @@ public Builder arguments(CommandElement args) {
}

/**
* Set the argument specification for this command. This method accepts a sequence of arguments. This is equivalent to calling {@code
* Sets the argument specification for this command. This method accepts a sequence of arguments. This is equivalent to calling {@code
* arguments(seq(args))}
*
* @see GenericArguments
Expand All @@ -234,7 +234,7 @@ public Builder arguments(CommandElement... args) {
}

/**
* Set the input tokenizer to be used to convert input from a string into a list of argument tokens.
* Sets the input tokenizer to be used to convert input from a string into a list of argument tokens.
*
* @see InputTokenizer for common input parser implementations
* @param parser The parser to use
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/spongepowered/api/config/ConfigManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
public interface ConfigManager {

/**
* Get the configuration root for a plugin that utilizes the shared
* Gets the configuration root for a plugin that utilizes the shared
* configuration folder.
*
* <p>The shared configuration folder <em>may</em> refer to
Expand All @@ -64,7 +64,7 @@ public interface ConfigManager {
ConfigRoot getSharedConfig(Object instance);

/**
* Get the configuration root for a plugin that utilizes a configuration
* Gets the configuration root for a plugin that utilizes a configuration
* folder specific to the plugin, which <em>may</em> also be a
* su-directory of the shared configuration folder.
*
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/spongepowered/api/config/ConfigRoot.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
public interface ConfigRoot {

/**
* Get the pathname to the default configuration file for the plugin.
* Gets the pathname to the default configuration file for the plugin.
*
* <p>If the configuration root is shared, then the returned pathname will
* refer to the path {@code $config/$plugin_id.conf} (where "$config" is the
Expand All @@ -66,7 +66,7 @@ public interface ConfigRoot {
Path getConfigPath();

/**
* Get the configuration file that utilizes the default configuration
* Gets the configuration file that utilizes the default configuration
* pathname.
*
* @return A configuration object
Expand All @@ -75,7 +75,7 @@ public interface ConfigRoot {
ConfigurationLoader<CommentedConfigurationNode> getConfig();

/**
* Get the directory that this configuration root refers to.
* Gets the directory that this configuration root refers to.
*
* <p>The returned pathname may not refer to a directory that exists
* yet.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public enum Type {


/**
* Get the type of result.
* Gets the type of result.
*
* @return the type of result
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public interface ImmutableDataHolder<T extends ImmutableDataHolder<T>> extends D
ImmutableValueStore<T, ImmutableDataManipulator<?, ?>> {

/**
* Get a copy of all properties defined on this
* Gets a copy of all properties defined on this
* {@link ImmutableDataHolder}, with their current values.
*
* @return A collection of all known manipulators
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/spongepowered/api/data/Property.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public final boolean compare(@Nullable Property<?, ?> operand1, @Nullable Proper
protected abstract boolean apply(Property<?, ?> operand1, Property<?, ?> operand2);

/**
* Get the default operator to use if none is specified.
* Gets the default operator to use if none is specified.
*
* @return the default operator
*/
Expand All @@ -176,7 +176,7 @@ public static Operator defaultOperator() {
}

/**
* Get the key for this property. Key is only used if an item stack can have
* Gets the key for this property. Key is only used if an item stack can have
* more than one property of a particular type. If the property has no
* specific key, the property class name is returned so that properties of
* the same type are implicitly comparable.
Expand All @@ -186,15 +186,15 @@ public static Operator defaultOperator() {
K getKey();

/**
* Get the "value" of this property. "Value" may have different meanings
* Gets the "value" of this property. "Value" may have different meanings
* depending on the exact type of this property.
*
* @return the value of this property
*/
@Nullable V getValue();

/**
* Get the operator to use when comparing another property with this
* Gets the operator to use when comparing another property with this
* property.
*
* @return the operator to use when comparing another property with this
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/spongepowered/api/data/key/Keys.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public final class Keys {
public static final Key<OptionalValue<Integer>> EXPLOSION_RADIUS = KeyFactory.fake("EXPLOSION_RADIUS");

/**
* Represents the {@link Key} for representing the {@link BigMushroomType}
* Represents the {@link Key} for representing the extended state
* of a {@link BlockState}.
*
* @see ExtendedData#extended()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ public final Optional<T> build(DataView container) throws InvalidDataException {
Optional<DataContentUpdater> updater = Sponge.getDataManager().getWrappedContentUpdater(this.requiredClass, contentVersion,
this.supportedVersion);
if (!updater.isPresent()) {
throw new InvalidDataException("Could not get an updater for ItemEnchantment data from the version: " + contentVersion
+ " to " + this.supportedVersion + ". Please notify the SpongePowered developers of this issue!");
throw new InvalidDataException("Could not get an updater for " + this.requiredClass.getName()
+ " data from the version: " + contentVersion + " to " + this.supportedVersion
+ ". Please notify the SpongePowered developers of this issue!");
}
container = updater.get().update(container);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected AbstractProperty(@Nullable K key, @Nullable V value, @Nullable Operato
}

/**
* Get the default value for {@link #key}, used in case null is passed in
* Gets the default value for {@link #key}, used in case null is passed in
* (since we can't have a null key). In general this should return the class
* name of the property itself but subclasses are free to alter this
* behaviour if they wish.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public interface LocationBasePropertyHolder {
Collection<Property<?, ?>> getProperties(int x, int y, int z);

/**
* Get all the faces of this block that have the given property.
* Gets all the faces of this block that have the given property.
*
* @param coords The coordinates
* @param propertyClass The property class
Expand All @@ -151,7 +151,7 @@ default Collection<Direction> getFacesWithProperty(Vector3i coords, Class<? exte
}

/**
* Get all the faces of this block that have the given property.
* Gets all the faces of this block that have the given property.
*
* @param x The x coordinate
* @param y The y coordinate
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/org/spongepowered/api/entity/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
public interface Entity extends Identifiable, Locatable, DataHolder, DataSerializable, Translatable {

/**
* Get the type of entity.
* Gets the type of entity.
*
* @return The type of entity
*/
Expand Down Expand Up @@ -275,8 +275,6 @@ default boolean setLocationAndRotationSafely(Location<World> location, Vector3d
/**
* Sets the {@link Location} of this entity to the {@link World}'s spawn point.
*
* <p>This is equivalent to setting the location via {@link TargetedLocationData}.</p>
*
* @param world The world to transfer to
*/
default boolean transferToWorld(World world) {
Expand All @@ -286,8 +284,6 @@ default boolean transferToWorld(World world) {
/**
* Sets the {@link Location} of this entity to a new position in a world.
*
* <p>This is equivalent to setting the location via {@link TargetedLocationData}.</p>
*
* @param world The world to transfer to
* @param position The position in the target world
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/spongepowered/api/entity/Equipable.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
public interface Equipable extends Identifiable, Carrier {

/**
* Get whether this entity can equip equipment of the specified type (eg.
* Gets whether this entity can equip equipment of the specified type (eg.
* whether calling {@link #equip} will fail because the entity doesn't
* have this type of slot.
*
Expand All @@ -49,7 +49,7 @@ public interface Equipable extends Identifiable, Carrier {
boolean canEquip(EquipmentType type);

/**
* Get whether this entity can equip the supplied equipment in its slot of
* Gets whether this entity can equip the supplied equipment in its slot of
* the specified type (eg. whether calling {@link #equip} with the specified
* slot type and item will succeed)
*
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/spongepowered/api/event/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
*/
@ImplementedBy(value = AbstractEvent.class, priority = Integer.MIN_VALUE)
public interface Event {

/**
* Get the cause for the event.
* Gets the cause for the event.
*
* @return The last cause
*/
Expand Down
Loading

0 comments on commit 871fcd1

Please sign in to comment.