From 4109863aa9cd6e3cfdee214316f5217735222d71 Mon Sep 17 00:00:00 2001 From: Luck Date: Thu, 25 May 2017 21:35:47 +0100 Subject: [PATCH] Fix -s flag (#132) --- .../luckperms/common/commands/impl/user/UserDemote.java | 7 +------ .../luckperms/common/commands/impl/user/UserPromote.java | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserDemote.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserDemote.java index 57e60c6b..5803cd62 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserDemote.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserDemote.java @@ -84,13 +84,8 @@ public class UserDemote extends SubCommand { return CommandResult.STATE_ERROR; } + boolean silent = args.remove("-s"); MutableContextSet context = ArgumentUtils.handleContext(1, args, plugin); - boolean silent = false; - - if (args.contains("-s")) { - args.remove("-s"); - silent = true; - } // Load applicable groups Set nodes = user.getNodes().values().stream() diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserPromote.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserPromote.java index 580d4531..bcc6d8d3 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserPromote.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserPromote.java @@ -84,13 +84,8 @@ public class UserPromote extends SubCommand { return CommandResult.STATE_ERROR; } + boolean silent = args.remove("-s"); MutableContextSet context = ArgumentUtils.handleContext(1, args, plugin); - boolean silent = false; - - if (args.contains("-s")) { - args.remove("-s"); - silent = true; - } // Load applicable groups Set nodes = user.getNodes().values().stream()