SpongeAPI
SpongeAPI copied to clipboard
Ongoing Minor Issue List (SpongeAPI Edition)
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.
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)"
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
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
Double empty line: https://github.com/SpongePowered/SpongeAPI/blob/d11dd158943f96c0ca1d91ebe53d9296baf4199d/src/main/java/org/spongepowered/api/event/cause/entity/damage/source/DamageSource.java#L153
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
.
- In the comments of the methods
DataView#getObject()
andDataView#getObjectList()
requested object(s) described as implementing theDataSerializable
interface, but these objects are not required to implement theDataSerializable
interface and serializing byDataTranslator
. - 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
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
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.
{@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
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
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
Link to docs should be: https://docs.spongepowered.org/stable/en/contributing/guidelines.html https://github.com/SpongePowered/SpongeAPI/blob/1a5f417bb012da8805c3deed04e94538fa9f18e3/CONTRIBUTING.md#L5
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
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