Those will only be available when run on a Spigot-based server.
Other changes:
* Added a few new utility methods to TextUtils.
* Slightly changed how TextUtils#getPlayerString deals with a missing player name.
* Made CollectionUtils#getIdealHashMapCapacity public.
Previously it would use 'unknown' as fallback name.
API: Renamed PlayerShopkeeper#getOwnerAsString to #getOwnerString.
API: Added Shopkeeper#getIdString.
Removed the importing of old book offers (from late MC 1.12.2, see v1.83). When updating from an older version of Shopkeepers, you will have to first update to a version in-between.
* Fixed: Command#handleFallbacks was missing a return when the fallback did not consume any of the remaining input arguments.
* Fixed fallback handling for optional and FirstOf arguments.
* Added display name property to all command arguments. This can be used to change the name that is used to represent the argument in the command format. This replaces the previous AliasArgument. This is especially useful for conflicting literal arguments. Literal arguments will omit their actual name from the argument completions if a different display name has been set.
* Added TypedFirstOfArgument, a variant of FirstOfArgument that preserves the result type of its child arguments.
* Made FallbackArgument abstract and added specializations AnyFallbackArgument and TypedFallbackArgument.
* Added NameArgument, which can be useful if there would otherwise be conflicts / ambiguities between arguments.
* Added debug option 'commands' and added various debug output when parsing and executing a command.
* ArgumentParseException provides the command argument that created it now. This is especially useful for debugging purposes.
* Minor changes to ArgumentsReader in order to make debugging easier.
* Minor formatting at a few places.
Previously it would abort the parsing beyond the fallback after the
first command argument was able to successfully parse an argument from
the input. In some cases this is however not sufficient to determine
whether parsing past the fallback succeeds or not.
Example: Command "/list [player] [page]" with input "/list 123 2": '123'
is a rare but valid player name. We want to use the fallback mechanic as
heuristic, but still be able to correctly parse the input if both
arguments are specified explicitly.
Previously '123' would get interpreted as page number, causing the
overall parsing to fail to due an unparsed argument at the end.
The fallback mechanic was changed to now try to fully parse the input
beyond the fallback. If there are remaining unparsed arguments, the
parsing past the fallback is considered to have failed and will then
lead to the fallback to be used (accepting any input for the player
name), resulting in the above example to get parsed correctly again.
Other command related changes:
* Split up the Command#parseArguments function into separate parts.
* Replaced CommandArgs with ArgumentsReader: The arguments are now
stored inside the CommandInput and the ArgumentsReader only references
them from there.
* CommandContext is now an interface (with SimpleCommandContext as
implementation). A new class CommandContextView was added that gets used
anywhere where accessing the context is allowed, while modifying is not.
* BufferedCommandContext#getMapView() was fixed. This now creates a new
SimpleCommandContext with the combined values.
* Command and tab completion handling was moved from BaseCommand into
Command.
* Resetting of the arguments reader if parsing of an command argument
failed was moved from CommandArgument#parse into Command.
* Removed the lazy initialization of Command's argument list and
CommandContext's values map. ArrayList and LinkedHashMap are smart
enough to not actually allocate the internal array until it is required
for the first element.
* Removed Guava dependency for reverse iterating arguments in Command
class.
* Command#parseArguments will now check for unexpected input arguments
even if the command doesn't use any arguments.
Also:
* Added CommandArgs#copy. Since the underlying arguments are expected to never change, they are not actually copied (only the parsing state is copied). Any captured CommandArgs states are applicable to the copy as well.
* Added CommandContext#copy() and made constructor CommandContext(otherContext) protected.
* Added TODO note on implementing OptionalArgument always via fallbacks.
This isn't currently used anywhere and most usecases for this are probably covered by the new fallback mechanic anyways now. Removing it simplifies the parsing procedure.
This includes the case that the config version is invalid. Previously it would treat invalid and missing config versions the same and apply config migrations nevertheless.
Also separated config and language file loading, and changed/added a few information/warning messages related to config and language file loading.
'object type' changed to 'object', and the arguments '{shopSessionId}' and '{shopId}' changed to '{shopId}' and '{shopUUID}' respectively. Argument '{shopSessionId}' still works but will likely get removed in the future.
Also fixed: The internal default for message 'msg-list-shops-entry' (that gets used if the message is missing in the config) was not matching the message in the default config.
This can be used by plugins to make registrations during Shopkeepers' startup process (eg. to register custom shop types, object types, etc.). This event is marked as deprecated because custom shop types, object types, etc. are not yet officially supported as part of the API. Also, the event is called so early that the plugin (and thereby the API) are not yet fully setup and ready to be used, so this event is only of use for plugins which know what they are doing.
Default shop, object and ui types are getting registered early during onLoad now (similar to config loading).