Skip to content

Commit

Permalink
Remove unused 'reset' method from CharacterTagCommand
Browse files Browse the repository at this point in the history
The 'reset' method was redundant and no longer invoked by the command logic. Cleaning up unused code reduces clutter and improves maintainability of the project.
  • Loading branch information
NonSwag committed Jan 22, 2025
1 parent d4cdb5a commit 7b084d7
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,17 +265,6 @@ private static int setVisible(CommandContext<CommandSourceStack> context, Charac
return success ? Command.SINGLE_SUCCESS : 0;
}

private static int reset(CommandContext<CommandSourceStack> context, CharacterPlugin plugin) {
var sender = context.getSource().getSender();
var character = context.getArgument("character", Character.class);

var success = character.setDisplayName(null);
var message = success ? "character.tag.reset" : "nothing.changed";

plugin.bundle().sendMessage(sender, message, Placeholder.unparsed("character", character.getName()));
return success ? Command.SINGLE_SUCCESS : 0;
}

private static int setText(CommandContext<CommandSourceStack> context, CharacterPlugin plugin) {
var sender = context.getSource().getSender();
var character = context.getArgument("character", Character.class);
Expand Down

0 comments on commit 7b084d7

Please sign in to comment.