Rename variable for silent flag

This commit is contained in:
Luck 2020-02-27 13:20:14 +00:00
parent 6fea194ef5
commit 0a3141841c
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 4 additions and 4 deletions

View File

@ -82,7 +82,7 @@ public class UserDemote extends ChildCommand<User> {
return CommandResult.STATE_ERROR; return CommandResult.STATE_ERROR;
} }
boolean silent = args.remove("-s"); boolean dontShowTrackProgress = args.remove("-s");
MutableContextSet context = ArgumentParser.parseContext(1, args, plugin); MutableContextSet context = ArgumentParser.parseContext(1, args, plugin);
if (ArgumentPermissions.checkContext(plugin, sender, getPermission().get(), context)) { if (ArgumentPermissions.checkContext(plugin, sender, getPermission().get(), context)) {
@ -130,7 +130,7 @@ public class UserDemote extends ChildCommand<User> {
String groupTo = result.getGroupTo().get(); String groupTo = result.getGroupTo().get();
Message.USER_DEMOTE_SUCCESS.send(sender, user.getFormattedDisplayName(), track.getName(), groupFrom, groupTo, MessageUtils.contextSetToString(plugin.getLocaleManager(), context)); Message.USER_DEMOTE_SUCCESS.send(sender, user.getFormattedDisplayName(), track.getName(), groupFrom, groupTo, MessageUtils.contextSetToString(plugin.getLocaleManager(), context));
if (!silent) { if (!dontShowTrackProgress) {
Message.BLANK.send(sender, MessageUtils.listToArrowSep(track.getGroups(), groupTo, groupFrom, true)); Message.BLANK.send(sender, MessageUtils.listToArrowSep(track.getGroups(), groupTo, groupFrom, true));
} }

View File

@ -82,7 +82,7 @@ public class UserPromote extends ChildCommand<User> {
return CommandResult.STATE_ERROR; return CommandResult.STATE_ERROR;
} }
boolean silent = args.remove("-s"); boolean dontShowTrackProgress = args.remove("-s");
MutableContextSet context = ArgumentParser.parseContext(1, args, plugin); MutableContextSet context = ArgumentParser.parseContext(1, args, plugin);
if (ArgumentPermissions.checkContext(plugin, sender, getPermission().get(), context)) { if (ArgumentPermissions.checkContext(plugin, sender, getPermission().get(), context)) {
@ -130,7 +130,7 @@ public class UserPromote extends ChildCommand<User> {
String groupTo = result.getGroupTo().get(); String groupTo = result.getGroupTo().get();
Message.USER_PROMOTE_SUCCESS.send(sender, user.getFormattedDisplayName(), track.getName(), groupFrom, groupTo, MessageUtils.contextSetToString(plugin.getLocaleManager(), context)); Message.USER_PROMOTE_SUCCESS.send(sender, user.getFormattedDisplayName(), track.getName(), groupFrom, groupTo, MessageUtils.contextSetToString(plugin.getLocaleManager(), context));
if (!silent) { if (!dontShowTrackProgress) {
Message.BLANK.send(sender, MessageUtils.listToArrowSep(track.getGroups(), groupFrom, groupTo, false)); Message.BLANK.send(sender, MessageUtils.listToArrowSep(track.getGroups(), groupFrom, groupTo, false));
} }