SpongeAPI icon indicating copy to clipboard operation
SpongeAPI copied to clipboard

Ongoing Minor Issue List (SpongeAPI Edition)

Open Deamon5550 opened this issue 9 years ago • 14 comments

SpongeAPI | Sponge

Checkstyle issues should not be reported here as those can be more accurately determined by simply running the checkstyle tool. Examples of good issues to report here are misnamed methods/fields, poorly worded javadocs, formatting issues.

As minor things are resolved, comments will be deleted.

Deamon5550 avatar Jan 01 '16 06:01 Deamon5550

Breaking: @xakep_sdk "RespawnEvent.java, I think, getOriginalPlayer should be renamed into getCorpse because name can be confusing.(in api 8, in api 7 we can just mark behavior in javadoc)"

ryantheleach avatar Jan 28 '18 02:01 ryantheleach

https://github.com/SpongePowered/SpongeAPI/blob/bleeding/src/main/java/org/spongepowered/api/entity/living/player/Player.java#L104

openInventory doesn't take a cause argument so the description for the exception doesn't make sense

hsyyid avatar May 29 '18 14:05 hsyyid

Document how to save schematics on the Schematic JD, or otherwise provide a helper method.

https://github.com/SpongePowered/Cookbook/blob/master/Plugin/CopyPasta/src/main/java/org/spongepowered/cookbook/plugin/CopyPasta.java

ryantheleach avatar Jun 18 '18 06:06 ryantheleach

Double empty line: https://github.com/SpongePowered/SpongeAPI/blob/d11dd158943f96c0ca1d91ebe53d9296baf4199d/src/main/java/org/spongepowered/api/event/cause/entity/damage/source/DamageSource.java#L153

randombyte-developer avatar Jun 27 '18 21:06 randombyte-developer

Needs capitalization after @return:

https://github.com/SpongePowered/SpongeAPI/blob/bleeding/src/main/java/org/spongepowered/api/util/ban/Ban.java#L108

Also, there seems to be some inconsistencies in the file, where sometimes it is referred to as this ban, and sometimes as the ban.

ItsDoot avatar Jul 02 '18 05:07 ItsDoot

  1. In the comments of the methods DataView#getObject() and DataView#getObjectList() requested object(s) described as implementing the DataSerializable interface, but these objects are not required to implement the DataSerializable interface and serializing by DataTranslator.
  2. Small typo with markup in class documentation: https://github.com/SpongePowered/SpongeAPI/blob/b2736425ce386018267484f3fed65c9950e5d984/src/main/java/org/spongepowered/api/event/item/inventory/UseItemStackEvent.java#L178

Lignium avatar Jan 04 '19 02:01 Lignium

Here you can replace Set<Context> with a more flexible Set<? super Context> without loss of compatibility. Thus it will be possible to pass in arguments for example, Set<Object> or Set<Map.Entry<String, String>>. https://github.com/SpongePowered/SpongeAPI/blob/aee9f1c5f1851a9c2ce8dabc2064a75d65825a0c/src/main/java/org/spongepowered/api/service/context/ContextCalculator.java#L125

Lignium avatar Jul 14 '19 12:07 Lignium

https://jd.spongepowered.org/7.2.0/org/spongepowered/api/item/inventory/Inventory.html#offer-org.spongepowered.api.item.inventory.ItemStack- has a very confusing javadoc. It says it returns true if one or more (up to the total number of items in the supplied stack) items were consumed. but the type returned is InventoryTransactionResult. Not sure if this is intentional, but calling .getRejectedItems() only returns something if the whole stack was rejected, even if it was partially rejected. It seems like theres a mix of mutating the ItemStack and returning a result going on here. I think it should be one or the other.

tyhdefu avatar Apr 10 '20 11:04 tyhdefu

{@link Listener}d instead of {@link Listener}s or {@link Listener} https://github.com/SpongePowered/SpongeAPI/blob/e36c95af0a6379beec9377ce9dce64a10a2a601c/src/main/java/org/spongepowered/api/event/Order.java#L28

NxDs avatar Jul 22 '21 14:07 NxDs

Should be CommandCause commandCause or just cause https://github.com/SpongePowered/SpongeAPI/blob/4f58aebd233a83fb8434c5d162a976b997e778b6/src/main/java/org/spongepowered/api/command/parameter/managed/ValueParameter.java#L107 https://github.com/SpongePowered/SpongeAPI/blob/4f58aebd233a83fb8434c5d162a976b997e778b6/src/main/java/org/spongepowered/api/command/parameter/managed/ValueParameter.java#L102-L103

Lignium avatar Aug 07 '21 13:08 Lignium

Returns a {@link WorldProperties}.

https://github.com/SpongePowered/SpongeAPI/blob/1a5f417bb012da8805c3deed04e94538fa9f18e3/src/main/java/org/spongepowered/api/command/parameter/managed/standard/ResourceKeyedValueParameters.java#L465-L467

Lignium avatar Nov 08 '21 21:11 Lignium

Link to docs should be: https://docs.spongepowered.org/stable/en/contributing/guidelines.html https://github.com/SpongePowered/SpongeAPI/blob/1a5f417bb012da8805c3deed04e94538fa9f18e3/CONTRIBUTING.md#L5

JonesiBlitz avatar Nov 09 '21 08:11 JonesiBlitz

The minimum Java version for API 9 is 17, but the README on the api-9 branch states otherwise: https://github.com/SpongePowered/SpongeAPI/blob/api-9/README.md#prerequisites

A248 avatar Aug 20 '22 21:08 A248

This method doesn't need a generic. API 8+

https://github.com/SpongePowered/SpongeAPI/blob/7946be0c31e88b6bf1b60b173abf48e945cf939a/src/main/java/org/spongepowered/api/effect/particle/ParticleEffect.java#L167-L169

DrZoddiak avatar Sep 18 '23 03:09 DrZoddiak