Spongeapi: Ongoing Minor Issue List (OCD List) Beta Edition

Created on 1 Jan 2016  路  10Comments  路  Source: SpongePowered/SpongeAPI

SpongeAPI | SpongeCommon | SpongeForge | SpongeVanilla

A new and improved Minor issue list for Beta. This list will be handled a little differently in order to make it much clearer whether a reported issue has been noted and/or fixed. Minor issues reported here will be added to the main comment and the reporting comment will be deleted. 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, minor logical errors (like that something could be using a java8 stream).

Minor Issue List

low accepted

All 10 comments

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

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.

  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

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.

https://jd.spongepowered.org/7.1.0/org/spongepowered/api/data/key/Keys.html#TREE_TYPE says its the key for representing the TreeType of a BlockState, but infact, its used for different woods of a boat entity, this comment makes it seem like its exclusive to BlockState, maybe change it to "such as a Blockstate" or something similar

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LJNIC picture LJNIC  路  5Comments

Favorlock picture Favorlock  路  6Comments

Lergin picture Lergin  路  5Comments

lesbleu picture lesbleu  路  4Comments

Eufranio picture Eufranio  路  5Comments