Closed kantenkugel closed 5 years ago
As a note: I'm not entirely sure if the synchronization on the index is required. i kept it from the previous code (and added it to the method missing that sync), but eg the changes to the Command list were not synchronized for example
Pull Request
Pull Request Checklist
Please follow the following steps before opening this PR.
PRs that do not complete the checklist will be subject to denial for missing information.
Pull Request Information
Check and fill in the blanks for all that apply:
command
module of the JDA-Utilities library.______
.Description
While investigating the source code for the command registry, i found some issues regarding the command indexing that was used if > 20 commands were registered:
addCommand(Command command, int index)
with index not being the current list size, some elements in the index were not properly shifted (of the insertion index)This PR tries to fix those issues. The strategy of the index usage is now "Always use indexing" as already discussed with Jag.
Some minor code improvements are also included.