Commit Graph

188 Commits

Author SHA1 Message Date
Aikar 8da50b0b0d Current work on removing some SetMultimap - Broken atm
Seems to be breaking things and mutating state undesirably for help system?

Not sure whats going on yet
2018-03-31 14:09:31 -04:00
Aikar 2d45e03dae Replace use of Guava Table with my own table - Closes #121 2018-03-31 00:59:21 -04:00
chickeneer ac362d7aa6 Fix deprecation warning for UnknownHandler, should point to CatchUnknown 2018-03-30 16:46:48 -05:00
Aikar 8007b933dd Disable setDefaultCompletion as not done yet 2018-03-29 22:01:51 -04:00
DarkPaladin 87613fb59b WIP: Set default completion contexts (#101)
* Register default completion

* Remove auto add @ because it is possible to have completion ids without them

Aikar note - Going to make this private in next commit until feature is done
2018-03-29 21:59:38 -04:00
Aikar 7286b75466 move help output structure to formatter so it can be overridden 2018-03-29 21:55:44 -04:00
Aikar d1054d52ef Revert all Method Handle stuff.
According to https://gist.github.com/raphw/881e1745996f9d314ab0 its not faster in dynamic, unknown situations.
2018-03-26 01:48:14 -04:00
chickeneer e423b877ff Disable method handles to use reflection due to WrongMethodTypeException 2018-03-24 20:55:00 -05:00
JanTuck 31743b0326 Fix methodHandle error (#119)
Fix exception thrown by incorrect function
2018-03-24 19:47:38 -05:00
Aikar d61c937dce fix dupe command prefix 2018-03-24 15:57:48 -04:00
Mariell 44c942101b Add Norwegian bokmål & nynorsk (#111)
* Add bokmål & nynorsk

* Fix colour
2018-03-24 11:02:19 -04:00
Mariell 11dcee8b39 Use MethodHandles for invocation (#112)
* Use method handles for invocation

* Fix parsing, add more safety and add for named MessageChannels, and format

* Add methodhandle support to BaseCommand
2018-03-24 10:59:43 -04:00
Aikar 1362fd4b91 Dont use command prefix in header, expose as replacement 2018-03-22 08:50:31 -04:00
Aikar 5794c3ea58 use a diff format key for detailed command help 2018-03-21 23:35:22 -04:00
Aikar aafea3d74b add {syntax} replacement to param help 2018-03-21 23:29:47 -04:00
Aikar 83bcbbd01e some reformatting 2018-03-21 23:01:47 -04:00
Aikar db94aa4317 Clean up help formatter method signatures 2018-03-21 22:56:19 -04:00
Aikar e8bb460ae0 Use MessageKeyProvider for locales 2018-03-21 22:23:02 -04:00
Aikar 08b8ab6355 Consistently set the correct command prefix 2018-03-21 22:16:24 -04:00
Aikar 8cf361aeaf Merge branch 'MiniDigger-help-improvements'
* MiniDigger-help-improvements:
  Improvements to help formatter
  start with abstracting help messages out
  make sure to only treat a type as sender if its not annotated with "other"
  help improvements
2018-03-21 22:05:19 -04:00
Aikar 8335d580f6 Improvements to help formatter 2018-03-21 22:02:48 -04:00
Aikar 96238f9e06 Merge branch 'help-improvements' of https://github.com/MiniDigger/commands into MiniDigger-help-improvements
* 'help-improvements' of https://github.com/MiniDigger/commands:
  start with abstracting help messages out
  make sure to only treat a type as sender if its not annotated with "other"
  help improvements
2018-03-21 21:20:53 -04:00
Emil 0deeeeca5e Add Swedish as supported language. (#109) 2018-03-20 10:57:50 -04:00
Aikar 633c6278b5 Ignore command issuer for context resolution in completions 2018-03-18 01:11:25 -04:00
Aikar 65af80a430 Default empty descriptions 2018-03-17 20:38:45 -04:00
Aikar 9024e878b1 fix annotation lookup 2018-03-17 20:27:11 -04:00
Aikar ec235d80fc Fix Bukkit Description being null, supply usage/description to Sponge/Bungee 2018-03-17 19:51:52 -04:00
Aikar 901359356f fix looking up annotations without value methods 2018-03-17 19:46:22 -04:00
Aikar 5c9763ac00 More cleanup and refactoring
All annotations should be read for most part at registration now
2018-03-17 19:18:16 -04:00
Aikar df6ccc0a24 move annotation lookup methods into their own file to declutter class 2018-03-17 16:49:01 -04:00
Aikar 8008d6d063 clean up code more, break out methods 2018-03-17 12:31:05 -04:00
Aikar d8017789d6 Refactor all annotation lookups in prep for processors 2018-03-17 12:31:05 -04:00
Aikar b55e15db50 Fix max value check for Long and add more type flag helpers 2018-03-17 12:26:34 -04:00
Aikar 99e2b8543d Fix inverted syntax logic, thanks minecoder 2018-03-17 00:17:10 -04:00
Aikar 3034b11724 move syntax parsing to CommandParameter 2018-03-16 23:54:59 -04:00
Aikar 7353aa0b2e fix sponge tab complete API 2018-03-16 16:51:09 -04:00
Aikar 2d0995a3ac Refactor how parameter annotations are parsed to prep for processors
this also will improve performance, as we will only do flag parsing and replacements
once on register instead of every execution for some things.
2018-03-15 23:22:18 -04:00
MiniDigger 79f4074caf better number error msg (#108) 2018-03-11 11:42:08 -04:00
Aikar 37e435ce34 add min/max validation flags.
This should of really been conditions, but lazy to set that up proper for now.
2018-03-10 16:07:28 -05:00
MiniDigger 2f80fd4fdf start with abstracting help messages out 2018-03-10 00:58:06 +01:00
MiniDigger a4c67f66a2 make sure to only treat a type as sender if its not annotated with "other" 2018-03-08 22:39:31 +01:00
MiniDigger a26eb31a04 help improvements 2018-03-08 21:44:02 +01:00
Aikar 0babe4cdf4 Add Contexts for BigDecimal and BigInteger 2018-02-28 20:01:05 -05:00
Aikar f2c906a17a Validate subcommand configuration 2018-02-28 19:39:02 -05:00
Aikar 82390e5443 restore .setPlayerLocale API on bukkit manager
This was public, so cant remove it
2018-02-28 18:03:58 -05:00
games647 edf7ecc020 Add support for per issuer locale in Sponge and BungeeCord (#104)
* Add support for per issuer locale in Sponge and BungeeCord

* Added Optional<UUID> getUniqueId to CommandIssuer
* Added update task and delayed join listener in BungeeCord
* Added settings change listener in Sponge
* Moved setLocale method up to the CommandManager to remove the
amount of duplicated code

* Remove Optional usage

* Remove player terminology in core
2018-02-28 17:53:27 -05:00
LucasD c3ee9d4f20 Add brazilian portuguese translation (#103)
* Add brazilian portuguese translation

* Renaming pt_BR to pt, sub dialects must be implemented by plugin authors.
2018-02-27 20:11:38 -05:00
Aikar 1a9c9ab9ef some start of an annotation processor interface 2018-02-15 23:56:29 -05:00
Xavier 0d0b2ef425 Added support for loading message bundles from other ClassLoaders, an… (#99)
* Added support for loading message bundles from other ClassLoaders, and made the Bukkit & Bungee locales attempt to load from the ClassLoader that ACF is apart of, and the ClassLoader that the CommandManagers plugin belongs to

* Added the ability to add/register a ClassLoader to be scanned for Locales. The Locales automatically adds its own ClassLoader to the list, and the Bungee, Bukkit and Sponge implementations automatically add the plugins ClassLoader to the list

* Fixes the issue with conflicting bundle names although they may belong to two different ClassLoaders
2018-02-08 15:27:50 -05:00
MiniDigger cebe28ef6c [WIP] Add dependency injection functionality, Closes #85 (#86)
* misc improvements (as suggested by intellij)

* first draft of the DI functionality (#85)

* address review

* reenabled disabled inspections

* overload registerDependency method

* inject fields of superclasses two and remove invalid sponge default dependency
2018-01-25 14:21:16 -05:00