chore(core): deprecate prefixed accessors/mutators in CommandManager (#377)
chore(core): deprecate prefixed accessors/mutators in CommandManager.java All prefixed (actual) getters/setters in CommandManager have been deprecated, and non-prefixed alternatives have been introduced. I've also put some effort into improving the JavaDocs of these methods.
This commit is contained in:
parent
687cd4c536
commit
296539d56c
48 changed files with 400 additions and 157 deletions
|
|
@ -71,7 +71,7 @@ public class BungeeCommandManager<C> extends CommandManager<C> {
|
|||
final @NonNull Function<@NonNull C, @NonNull CommandSender> backwardsCommandSenderMapper
|
||||
) {
|
||||
super(commandExecutionCoordinator, new BungeePluginRegistrationHandler<>());
|
||||
((BungeePluginRegistrationHandler<C>) this.getCommandRegistrationHandler()).initialize(this);
|
||||
((BungeePluginRegistrationHandler<C>) this.commandRegistrationHandler()).initialize(this);
|
||||
this.owningPlugin = owningPlugin;
|
||||
this.commandSenderMapper = commandSenderMapper;
|
||||
this.backwardsCommandSenderMapper = backwardsCommandSenderMapper;
|
||||
|
|
@ -80,15 +80,15 @@ public class BungeeCommandManager<C> extends CommandManager<C> {
|
|||
this.registerCommandPreProcessor(new BungeeCommandPreprocessor<>(this));
|
||||
|
||||
/* Register Bungee Parsers */
|
||||
this.getParserRegistry().registerParserSupplier(TypeToken.get(ProxiedPlayer.class), parserParameters ->
|
||||
this.parserRegistry().registerParserSupplier(TypeToken.get(ProxiedPlayer.class), parserParameters ->
|
||||
new PlayerArgument.PlayerParser<>());
|
||||
this.getParserRegistry().registerParserSupplier(TypeToken.get(ServerInfo.class), parserParameters ->
|
||||
this.parserRegistry().registerParserSupplier(TypeToken.get(ServerInfo.class), parserParameters ->
|
||||
new ServerArgument.ServerParser<>());
|
||||
|
||||
/* Register default captions */
|
||||
if (this.getCaptionRegistry() instanceof FactoryDelegatingCaptionRegistry) {
|
||||
if (this.captionRegistry() instanceof FactoryDelegatingCaptionRegistry) {
|
||||
final FactoryDelegatingCaptionRegistry<C> factoryDelegatingCaptionRegistry = (FactoryDelegatingCaptionRegistry<C>)
|
||||
this.getCaptionRegistry();
|
||||
this.captionRegistry();
|
||||
factoryDelegatingCaptionRegistry.registerMessageFactory(
|
||||
BungeeCaptionKeys.ARGUMENT_PARSE_FAILURE_PLAYER,
|
||||
(context, key) -> ARGUMENT_PARSE_FAILURE_PLAYER
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue