Fix migration log being sent to the console twice

This commit is contained in:
Luck committed 2017-01-31 12:29:06 +00:00
1 parent 0be6d658ed
commit 8dbb083b90
11 files changed
+39 -10

No files matched your search

@@ -57,7 +57,9 @@ public class MigrationPermissionManager extends SubCommand<Object> {
public CommandResult execute(LuckPermsPlugin plugin, Sender sender, Object o, List<String> args, String label) throws CommandException {
Consumer<String> log = s -> {
Message.MIGRATION_LOG.send(sender, s);
Message.MIGRATION_LOG.send(plugin.getConsoleSender(), s);
if (!sender.isConsole()) {
Message.MIGRATION_LOG.send(plugin.getConsoleSender(), s);
}
};
log.accept("Starting PermissionManager migration.");
@@ -64,7 +64,9 @@ public class MigrationPermissionsEx extends SubCommand<Object> {
public CommandResult execute(LuckPermsPlugin plugin, Sender sender, Object o, List<String> args, String label) throws CommandException {
Consumer<String> log = s -> {
Message.MIGRATION_LOG.send(sender, s);
Message.MIGRATION_LOG.send(plugin.getConsoleSender(), s);
if (!sender.isConsole()) {
Message.MIGRATION_LOG.send(plugin.getConsoleSender(), s);
}
};
log.accept("Starting PermissionsEx migration.");