Commit Graph

369 Commits

Author SHA1 Message Date
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
Aikar 0ab9283099 (DEPLOYED ACF) Updated JavaDocs 2018-02-14 23:38:34 -05:00
Aikar 9acd2df4a2 Clean up JDA to use an options object builder instead of ctor builder
safer for future additions, so we don't have to change the signature of JDA ctor
2018-02-14 23:36:39 -05:00
Xavier 816f1953df Added the autoDetectFromClient feature for Bukkit languages, it will disable the automated language detection system. (#100) 2018-02-08 15:28:54 -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
Aikar 94caa234cd (DEPLOYED ACF) Updated JavaDocs 2018-02-06 01:07:43 -05:00
Jeremy Wood d9b532de11 Properly handle multi-character command prefixes. (#95) 2018-01-26 01:07:02 -05:00
Jeremy Wood afc7f801b2 Improvements for JDA command prefixes. (#94) 2018-01-25 18:28:02 -05:00
Daniel Ennis c2d421ed19 Update CONTRIBUTORS.md 2018-01-25 18:24:45 -05:00
Jeremy Wood 03d3d8b0e9 Added common message channel conditions. (#92) 2018-01-25 17:53:16 -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
Jeremy Wood 23e8858c67 Improvements for JDA implementation. (#91)
* Added owneronly condition for JDA.

* Fixed command registration for JDA.

* Removed extraneous event handling.

* Initialize bot owner on ReadyEvent.
2018-01-24 16:57:17 -05:00
Jeremy Wood 9aaf990ddb Added owneronly condition for JDA. (#88) 2018-01-24 15:20:50 -05:00
kashike f858e71d7e Deprecate CatchAll in favour of CatchUnknown (#87) 2018-01-23 23:05:52 -05:00
Aikar 42a6b112de constructor for jda can stay public for child classes 2018-01-23 00:48:53 -05:00
Aikar c3089d61c7 misc changes for jda 2018-01-23 00:47:19 -05:00
Aikar 7f590a76b2 Add permission resolver, fix many bugs, move to a builder style constructor 2018-01-23 00:42:21 -05:00
Aikar f1197dcdfc oops missed replacement 2018-01-23 00:31:28 -05:00
Aikar afd116982d use an interface for CommandConfig
so you can bind the interface to your own config state objects
2018-01-23 00:30:45 -05:00
Aikar 65ca960882 Use getter/setters for config so people can override it to bridge configs 2018-01-22 23:49:43 -05:00
Aikar bdfed57936 Setup Command Config object and allow providing alternate configs 2018-01-22 23:31:34 -05:00
Aikar 310dfea272 Update readme to setup guides and add JDA 2018-01-22 22:57:09 -05:00
Aikar d06fa55211 provide a better User context for JDA 2018-01-22 22:27:13 -05:00
Aikar 85d266b667 Smurf name the JDACommandEvent 2018-01-22 22:21:53 -05:00
Aikar ba6cf9a87c add getEvent for more clear getter 2018-01-22 22:20:25 -05:00
Aikar 46ee14e4a3 provide some contexts for JDA 2018-01-22 22:18:17 -05:00
Aikar 8667970216 Add JDA Implementation - untested - not ready yet!
Hoping @dumptruckman can finish this up
2018-01-22 22:03:22 -05:00
Aikar 77751ad906 (DEPLOYED ACF) Updated JavaDocs 2018-01-15 21:16:15 -05:00
Aikar 2ce58133dc Repeat the last command completion param for all args 2018-01-15 21:14:53 -05:00
Aikar 93a57cbf2e Update readme with some more buzz words to hopefully help SEO 2018-01-14 20:03:06 -05:00
Aikar 442e438952 Nothing to see here 2018-01-14 19:51:13 -05:00
Aikar ba5adbc65d (DEPLOYED ACF) Updated JavaDocs 2018-01-14 19:49:45 -05:00
Aikar 1739bfc39c Add way to set @Flags context for entire command - Closes #29
Couldn't do it through annotations due to limitations on annotations,
but this achieves same goal.
2018-01-14 19:48:25 -05:00
Aikar c7211e0a2b Updated JavaDocs 2018-01-14 19:03:02 -05:00
Aikar a14b30caea Add @CatchAll as a better named replacement to @UnknownHandler
UnknownHandler will still work until we remove it in some future major update
2018-01-14 19:01:26 -05:00
Aikar 235914abc1 Updated JavaDocs 2018-01-13 11:22:05 -05:00
Aikar dce6bd2e64 add setPlayerLocale API for Bukkit 2018-01-13 11:20:45 -05:00
Aikar 1a99c9dcbc Updated JavaDocs 2018-01-10 21:05:44 -05:00
Aikar 55883cc3b1 Add an exception to show comamnd help 2018-01-10 21:04:37 -05:00
Aikar 0317fd5dfc Updated JavaDocs 2018-01-10 19:45:59 -05:00
Aikar 9f7eb9bcf5 Condition handlers wasnt meant to return boolean.
Sorry if anyone wrote one already, remove the return type please.

Really don't want to bump version when very low chance anyones using
this system yet.
2018-01-10 19:44:26 -05:00
Aikar 813272fe39 Updated JavaDocs 2018-01-08 23:34:43 -05:00
Aikar 40eaa9ea07 Command Conditions and MANY other code changes for Generics <3🌮
This completes and fully enables a new feature called "Conditions"

We already had some forms of conditions built into @Flags such as
on the Player for itemheld.

However, letting end users add additional restrictions to existing context
handlers such as players is not possible without redefining the context.

That's not friendly nor scalable.

Flags will now be primarily only for controlling how to resolve a context,
and then Conditions will then be the way to validate the context and trigger
a failure if the condition is not met.

Conditions can be placed on Command Class, Methods, or individual Parameters.
2018-01-08 23:30:27 -05:00
Aikar 01f47211bb update readme 2018-01-08 19:16:56 -05:00
Daniel Ennis 3781046746 Update LICENSE 2018-01-06 13:09:34 -05:00
Hex ae52acf6ed Fix typo (parseAndValudateNumber). (#83) 2018-01-06 12:08:43 -05:00
Aikar 607374bdfb Updated JavaDocs 2018-01-05 20:50:58 -05:00
Aikar bfc8534176 Validate that input does not exceed max values for numbers 2018-01-05 20:38:33 -05:00