mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
Miscellaneous grammar improvements
This commit is contained in:
+17
-9
@@ -1,7 +1,9 @@
|
||||
# Contributing to Annotation Command Framework
|
||||
|
||||
## The Golden Rule: Keep it small, work incrementally!
|
||||
|
||||
Unlike most other projects that won't take your PR every possible color of kitten can be considered, ACF prefers that you keep your PR's small, and work incrementally.
|
||||
Unlike most other projects that won't take your PR every possible color of kitten can be considered, ACF prefers that
|
||||
you keep your PR's small, and work incrementally.
|
||||
|
||||
Try to complete work to a small enough unit that it is mergeable.
|
||||
|
||||
@@ -10,18 +12,22 @@ larger systems that power ACF by contributing small units of the feature.
|
||||
|
||||
The larger a PR becomes, the more time it takes to review, and the bigger risk of change comes. Keep it simple!
|
||||
|
||||
Leave code in a package-private access level and then it will be promoted to public once we are ready to open it up for use.
|
||||
Leave code in a package-private access level, and then it will be promoted to public once we are ready to open it up for
|
||||
use.
|
||||
|
||||
## Keep major formatting and/or docs changes to existing code as completely separate PR's, but again, incremental
|
||||
Please keep formatting improvements and documentation to existing code (meaning, code that is not part of your own feature API)
|
||||
as standalone PR's. In other words, don't submit a PR that changes behavior or adds features, but also changes 10 other files
|
||||
unrelated to the PR just to improve things.
|
||||
|
||||
Please keep formatting improvements and documentation to existing code (meaning, code that is not part of your own
|
||||
feature API)
|
||||
as standalone PR's. In other words, don't submit a PR that changes behavior or adds features, but also changes 10 other
|
||||
files unrelated to the PR just to improve things.
|
||||
|
||||
Keep them separate, so they can be reviewed and pulled separately.
|
||||
|
||||
Additionally, keep them small and incremental!
|
||||
|
||||
## Discuss with Aikar before starting any major behavior change / annotation addition
|
||||
|
||||
Before you go spending a lot of time on a PR that isn't resolving an issue that Aikar filed, please consult with Aikar
|
||||
on Discord or IRC about the idea, to ensure it fits well with the projects goals.
|
||||
|
||||
@@ -30,11 +36,13 @@ ACF is moving to a very extensible goal for the 1.0.0 release, with powerful cus
|
||||
I want to avoid adding new stuff that will then be quickly deprecated when the more preferred approach comes out.
|
||||
|
||||
## Translations
|
||||
New messaging should add respective english Message Properties. if you know some of the other languages already translated,
|
||||
feel free to go ahead and add the translations for your new feature too. English is the only required language for a new feature.
|
||||
|
||||
Translators, I am leaving it up to the community to review and vet translations. If you see some bad translations, please
|
||||
submit a PR to correct them!
|
||||
New messaging should add respective english Message Properties. if you know some other languages already translated,
|
||||
feel free to go ahead and add the translations for your new feature too. English is the only required language for a new
|
||||
feature.
|
||||
|
||||
Translators, I am leaving it up to the community to review and vet translations. If you see some bad translations,
|
||||
please submit a PR to correct them!
|
||||
|
||||
Additionally, if you help translate messages for ACF, please follow the repo and keep up with new commits and watch for
|
||||
new messages, to keep the non english languages caught up.
|
||||
|
||||
@@ -50,6 +50,7 @@ public class BukkitLocales extends Locales {
|
||||
|
||||
/**
|
||||
* Loads the given file
|
||||
*
|
||||
* @param file
|
||||
* @param locale
|
||||
* @return If any language keys were added
|
||||
@@ -63,7 +64,8 @@ public class BukkitLocales extends Locales {
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a file out of the plugins data folder by the given name
|
||||
* Loads a file out of the plugin's data folder by the given name
|
||||
*
|
||||
* @param file
|
||||
* @param locale
|
||||
* @return If any language keys were added
|
||||
@@ -79,6 +81,7 @@ public class BukkitLocales extends Locales {
|
||||
/**
|
||||
* Loads every message from the Configuration object. Any nested values will be treated as namespace
|
||||
* so acf-core:\n\tfoo: bar will be acf-core.foo = bar
|
||||
*
|
||||
* @param config
|
||||
* @param locale
|
||||
* @return If any language keys were added
|
||||
|
||||
@@ -111,7 +111,7 @@ public class BungeeCommandManager extends CommandManager<
|
||||
return;
|
||||
}
|
||||
|
||||
//This can be null if we didn't received a settings packet
|
||||
//This can be null if we didn't receive a settings packet
|
||||
Locale locale = player.getLocale();
|
||||
if (locale != null) {
|
||||
setIssuerLocale(player, player.getLocale());
|
||||
|
||||
@@ -40,7 +40,7 @@ public class BungeeLocales extends Locales {
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a file out of the plugins data folder by the given name
|
||||
* Loads a file out of the plugin's data folder by the given name
|
||||
*
|
||||
* @param file
|
||||
* @param locale
|
||||
|
||||
@@ -164,7 +164,7 @@ public class CommandContexts<R extends CommandExecutionContext<?, ? extends Comm
|
||||
return s.charAt(0);
|
||||
});
|
||||
registerContext(String.class, (c) -> {
|
||||
// This will fail fast, its either in the values or its not
|
||||
// This will fail fast, it's either in the values or it's not
|
||||
if (c.hasAnnotation(Values.class)) {
|
||||
return c.popFirstArg();
|
||||
}
|
||||
@@ -239,7 +239,7 @@ public class CommandContexts<R extends CommandExecutionContext<?, ? extends Comm
|
||||
} else if (first != null && ACFUtil.isInteger(first)) {
|
||||
c.popFirstArg();
|
||||
page = ACFUtil.parseInt(first);
|
||||
if (page == null){
|
||||
if (page == null) {
|
||||
throw new InvalidCommandArgument(MessageKeys.MUST_BE_A_NUMBER, "{num}", first);
|
||||
}
|
||||
if (!c.getArgs().isEmpty()) {
|
||||
@@ -294,7 +294,7 @@ public class CommandContexts<R extends CommandExecutionContext<?, ? extends Comm
|
||||
/**
|
||||
* @see #registerIssuerAwareContext(Class, IssuerAwareContextResolver)
|
||||
* @deprecated Please switch to {@link #registerIssuerAwareContext(Class, IssuerAwareContextResolver)}
|
||||
* as the core wants to use the platform agnostic term of "Issuer" instead of Sender
|
||||
* as the core wants to use the platform-agnostic term of "Issuer" instead of Sender
|
||||
*/
|
||||
@Deprecated
|
||||
public <T> void registerSenderAwareContext(Class<T> context, IssuerAwareContextResolver<T, R> supplier) {
|
||||
|
||||
@@ -338,7 +338,7 @@ public abstract class CommandManager<
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default {@link ExceptionHandler} that is called when an exception occurs while executing a command, if the command doesn't have it's own exception handler registered.
|
||||
* Sets the default {@link ExceptionHandler} that is called when an exception occurs while executing a command, if the command doesn't have its own exception handler registered.
|
||||
*
|
||||
* @param exceptionHandler the handler that should handle uncaught exceptions. May not be null if logExceptions is false
|
||||
*/
|
||||
@@ -350,7 +350,7 @@ public abstract class CommandManager<
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default {@link ExceptionHandler} that is called when an exception occurs while executing a command, if the command doesn't have it's own exception handler registered, and lets you control if ACF should also log the exception still.
|
||||
* Sets the default {@link ExceptionHandler} that is called when an exception occurs while executing a command, if the command doesn't have its own exception handler registered, and lets you control if ACF should also log the exception still.
|
||||
* <p>
|
||||
* If you disable logging, you need to log it yourself in your handler.
|
||||
*
|
||||
|
||||
+39
-21
@@ -1,21 +1,27 @@
|
||||
# Annotation Command Framework (ACF)
|
||||
|
||||
## Purpose
|
||||
|
||||
This is the Framework created for [Empire Minecraft](https://ref.emc.gs/Aikar?gac=commands.github).
|
||||
|
||||
ACF Started as a Bukkit Command Framework, but has shifted to be platform agnostic and can be used on any Java based application.
|
||||
ACF Started as a Bukkit Command Framework, but has shifted to be platform-agnostic and can be used on any Java based
|
||||
application.
|
||||
|
||||
ACF is an extremely powerful command framework that takes nearly every concept of boilerplate code commonly found in command handlers, and abstracts them away behind annotations.
|
||||
ACF is an extremely powerful command framework that takes nearly every concept of boilerplate code commonly found in
|
||||
command handlers, and abstracts them away behind annotations.
|
||||
|
||||
ACF redefines how you build your command handlers, allowing things such as Dependency Injection, Validation, Tab Completion, Help Documentation, Syntax Advice, and Stateful Conditions to all be behind Annotations that you place on methods.
|
||||
ACF redefines how you build your command handlers, allowing things such as Dependency Injection, Validation, Tab
|
||||
Completion, Help Documentation, Syntax Advice, and Stateful Conditions to all be behind Annotations that you place on
|
||||
methods.
|
||||
|
||||
Clean up your command handlers and unleash rich command experiences that would be too burdensome to pull off manually.
|
||||
|
||||
## Beta Testing
|
||||
While the 0.x.x series of ACF is "Beta", note that it is very stable.
|
||||
It has been used for years on EMC.
|
||||
|
||||
While the 0.x.x series of ACF is "Beta", note that it is very stable. It has been used for years on EMC.
|
||||
|
||||
It is labeled Beta as the framework is growing fast and gaining new features, and API's are subject to breakage. The new features also may contain bugs, but we will work to fix them fast.
|
||||
It is labeled Beta as the framework is growing fast and gaining new features, and API's are subject to breakage. The new
|
||||
features also may contain bugs, but we will work to fix them fast.
|
||||
|
||||
Please be prepared to keep up with changes, but I try to keep them as least disruptful as possible.
|
||||
|
||||
@@ -23,8 +29,8 @@ v1.0.0 will be the signal that ACF features are more complete and the API will r
|
||||
|
||||
## Documentation / Using ACF
|
||||
|
||||
[Documentation Wiki](https://github.com/aikar/commands/wiki) - All of ACF's documentation is currently on the GitHub Wiki.
|
||||
Please review every page to learn about each feature.
|
||||
[Documentation Wiki](https://github.com/aikar/commands/wiki) - All of ACF's documentation is currently on the GitHub
|
||||
Wiki. Please review every page to learn about each feature.
|
||||
|
||||
See [Using ACF](https://github.com/aikar/commands/wiki/Using-ACF) on how to add ACF to your plugin and getting started.
|
||||
|
||||
@@ -33,29 +39,36 @@ See [Examples](https://github.com/aikar/commands/wiki/Real-World-Examples) for s
|
||||
## Targeted Platforms / Current Version
|
||||
|
||||
We are on version:
|
||||
- GROUP: co.aikar
|
||||
- VERSION `0.5.1-SNAPSHOT`
|
||||
|
||||
- GROUP: co.aikar
|
||||
- VERSION `0.5.1-SNAPSHOT`
|
||||
|
||||
ARTIFACTID varies by platform target:
|
||||
* [Bukkit](https://spigotmc.org): ***acf-bukkit*** (For targetting Bukkit/Spigot)
|
||||
* [Paper](https://paper.emc.gs): ***acf-paper*** (Recommended over Bukkit, will gradually enhance when ran on Paper, but still runs on Spigot)
|
||||
* [Sponge](https://www.spongepowered.org/): ***acf-sponge***
|
||||
* [BungeeCord](https://www.spigotmc.org/wiki/bungeecord/): ***acf-bungee***
|
||||
* [JDA](https://github.com/DV8FromTheWorld/JDA): ***acf-jda*** - IN PROGRESS - NOT READY
|
||||
|
||||
Setup Guides (Repo and Requirements): [Maven](https://github.com/aikar/commands/wiki/Maven-Setup), [Gradle](https://github.com/aikar/commands/wiki/Gradle-Setup)
|
||||
* [Bukkit](https://spigotmc.org): ***acf-bukkit*** (For targetting Bukkit/Spigot)
|
||||
* [Paper](https://paper.emc.gs): ***acf-paper*** (Recommended over Bukkit, will gradually enhance when ran on Paper, but
|
||||
still runs on Spigot)
|
||||
* [Sponge](https://www.spongepowered.org/): ***acf-sponge***
|
||||
* [BungeeCord](https://www.spigotmc.org/wiki/bungeecord/): ***acf-bungee***
|
||||
* [JDA](https://github.com/DV8FromTheWorld/JDA): ***acf-jda*** - IN PROGRESS - NOT READY
|
||||
|
||||
Setup Guides (Repo and Requirements): [Maven](https://github.com/aikar/commands/wiki/Maven-Setup)
|
||||
, [Gradle](https://github.com/aikar/commands/wiki/Gradle-Setup)
|
||||
You may include more than 1 platform in your jar if your plugin supports multiple platforms.
|
||||
|
||||
Any bump in version implies an API break. See [CHANGELOG](CHANGELOG.md) for information on migration guides for API breaks.
|
||||
Any bump in version implies an API break. See [CHANGELOG](CHANGELOG.md) for information on migration guides for API
|
||||
breaks.
|
||||
|
||||
Every change that should not cause any API break will be deployed over the current version.
|
||||
|
||||
## Say Thanks
|
||||
|
||||
If this library has helped you, please consider donating as a way of saying thanks
|
||||
|
||||
[](https://paypal.me/empireminecraft)
|
||||
|
||||
## Why does it require Java 8+?
|
||||
|
||||
Get off your dinosaur and get on this rocket ship!
|
||||
|
||||
Dinosaurs have been dead for a long time, so get off it before you start to smell.
|
||||
@@ -63,14 +76,15 @@ Dinosaurs have been dead for a long time, so get off it before you start to smel
|
||||
[Download Java 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
|
||||
|
||||
# Java Docs
|
||||
|
||||
- [ACF (Core)](https://aikar.github.io/commands/acf-core)
|
||||
- [ACF (Bukkit)](https://aikar.github.io/commands/acf-bukkit)
|
||||
- [ACF (Sponge)](https://aikar.github.io/commands/acf-sponge)
|
||||
- [ACF (Bungee)](https://aikar.github.io/commands/acf-bungee)
|
||||
- [ACF (JDA)](https://aikar.github.io/commands/acf-jda)
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
See Issues section.
|
||||
|
||||
Join [#aikar on Spigot IRC - irc.spi.gt](https://aikarchat.emc.gs) to discuss.
|
||||
@@ -78,11 +92,15 @@ Join [#aikar on Spigot IRC - irc.spi.gt](https://aikarchat.emc.gs) to discuss.
|
||||
Or [Code With Aikar](https://aikardiscord.emc.gs) Discord.
|
||||
|
||||
## Other projects by Aikar / Empire Minecraft
|
||||
- [TaskChain](https://taskchain.emc.gs) - Powerful context control to dispatch tasks Async, then access the result sync for API usage. Concurrency controls too.
|
||||
- [IDB](https://idb.emc.gs) - Simple and Intuitive JDBC Wrapper for Java
|
||||
- [Minecraft Timings](https://github.com/aikar/minecraft-timings/) - Add Timings to your plugin in a safe way that works on all Bukkit platforms (CraftBukkit - no timings, Spigot - Timings v1, Paper and Paper forks - Timings v2)
|
||||
|
||||
- [TaskChain](https://taskchain.emc.gs) - Powerful context control to dispatch tasks Async, then access the result sync
|
||||
for API usage. Concurrency controls too.
|
||||
- [IDB](https://idb.emc.gs) - Simple and Intuitive JDBC Wrapper for Java
|
||||
- [Minecraft Timings](https://github.com/aikar/minecraft-timings/) - Add Timings to your plugin in a safe way that works
|
||||
on all Bukkit platforms (CraftBukkit - no timings, Spigot - Timings v1, Paper and Paper forks - Timings v2)
|
||||
|
||||
## License
|
||||
|
||||
As with all my other public projects
|
||||
|
||||
Commands (c) Daniel Ennis (Aikar) 2016-2018.
|
||||
|
||||
@@ -3,7 +3,7 @@ package co.aikar.commands;
|
||||
public class JDAMessageFormatter extends MessageFormatter<String> {
|
||||
public JDAMessageFormatter() {
|
||||
// JDA does not support coloring messages outside of embed fields.
|
||||
// We pass three empty strings so as to remove color coded messages from appearing.
|
||||
// We pass three empty strings to remove color coded messages from appearing.
|
||||
super("", "", "");
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
|
||||
acf-minecraft.invalid_world = Error: That world does not exists.
|
||||
acf-minecraft.invalid_world = Error: That world does not exist.
|
||||
acf-minecraft.you_must_be_holding_item = Error: You must be holding an item in your main hand.
|
||||
acf-minecraft.player_is_vanished_confirm = \
|
||||
Warning: <c2>{vanished}</c2> is vanished. Do not blow their cover!\n\
|
||||
|
||||
@@ -107,7 +107,7 @@ public class VelocityCommandManager extends
|
||||
return;
|
||||
}
|
||||
|
||||
//This can be null if we didn't received a settings packet
|
||||
//This can be null if we didn't receive a settings packet
|
||||
Locale locale = player.getPlayerSettings().getLocale();
|
||||
if (locale != null) {
|
||||
setIssuerLocale(player, player.getPlayerSettings().getLocale());
|
||||
|
||||
Reference in New Issue
Block a user