Skip to content

Commit dcaf270

Browse files
author
david
committed
Rename 'bank' to 'banks' in command and method names
Changed the literal command and method names from 'bank' to 'banks' to correct the terminology. This adjustment ensures consistency across the command handling and improves code readability.
1 parent 2ce6f70 commit dcaf270

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

plugin/src/main/java/net/thenextlvl/service/command/ServiceInfoCommand.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class ServiceInfoCommand {
3131

3232
LiteralArgumentBuilder<CommandSourceStack> create() {
3333
return Commands.literal("info")
34-
.then(Commands.literal("bank").executes(this::infoBank))
34+
.then(Commands.literal("banks").executes(this::infoBanks))
3535
.then(Commands.literal("chat").executes(this::infoChat))
3636
.then(Commands.literal("economy").executes(this::infoEconomy))
3737
.then(Commands.literal("groups").executes(this::infoGroups))
@@ -40,15 +40,11 @@ LiteralArgumentBuilder<CommandSourceStack> create() {
4040
.executes(this::info);
4141
}
4242

43-
@SuppressWarnings("DuplicatedCode")
4443
private int info(CommandContext<CommandSourceStack> context) {
45-
46-
// ED8106
47-
4844
context.getSource().getSender().sendRichMessage("ServiceIO Information (v<version>)",
4945
Placeholder.parsed("version", plugin.getPluginMeta().getVersion()));
5046

51-
infoBank(context);
47+
infoBanks(context);
5248
infoChat(context);
5349
infoEconomy(context);
5450
infoGroups(context);
@@ -57,7 +53,7 @@ private int info(CommandContext<CommandSourceStack> context) {
5753
return Command.SINGLE_SUCCESS;
5854
}
5955

60-
private int infoBank(CommandContext<CommandSourceStack> context) {
56+
private int infoBanks(CommandContext<CommandSourceStack> context) {
6157
var sender = context.getSource().getSender();
6258
var bank = plugin.getServer().getServicesManager().load(BankController.class);
6359
var banks = getRegistrations(BankController.class, bank, BankController::getName);

0 commit comments

Comments
 (0)