@@ -0,0 +1,2520 @@
+package net.buycraft.plugin.sponge.util;%0A%0Aimport com.google.common.collect.ImmutableList;%0Aimport lombok.Getter;%0Aimport net.buycraft.plugin.util.CommandOutput;%0Aimport org.spongepowered.api.Sponge;%0Aimport org.spongepowered.api.command.CommandSource;%0Aimport org.spongepowered.api.command.source.ConsoleSource;%0Aimport org.spongepowered.api.service.context.Context;%0Aimport org.spongepowered.api.service.permission.Subject;%0Aimport org.spongepowered.api.service.permission.SubjectCollection;%0Aimport org.spongepowered.api.service.permission.SubjectData;%0Aimport org.spongepowered.api.text.Text;%0Aimport org.spongepowered.api.text.channel.MessageChannel;%0Aimport org.spongepowered.api.util.Tristate;%0A%0Aimport java.util.List;%0Aimport java.util.Optional;%0Aimport java.util.Set;%0A%0Apublic class LoggingCommandSource implements ConsoleSource %7B%0A    @Getter%0A    private final CommandOutput output = new CommandOutput();%0A%0A    @Override%0A    public String getName() %7B%0A        return %22CONSOLE%5EBC%22;%0A    %7D%0A%0A    @Override%0A    public String getIdentifier() %7B%0A        return Sponge.getServer().getConsole().getIdentifier();%0A    %7D%0A%0A    @Override%0A    public Set%3CContext%3E getActiveContexts() %7B%0A        return Sponge.getServer().getConsole().getActiveContexts();%0A    %7D%0A%0A    @Override%0A    public void sendMessage(Text text) %7B%0A        output.addLine(text.toPlain());%0A    %7D%0A%0A    @Override%0A    public MessageChannel getMessageChannel() %7B%0A        return MessageChannel.fixed(this);%0A    %7D%0A%0A    @Override%0A    public void setMessageChannel(MessageChannel messageChannel) %7B%0A%0A    %7D%0A%0A    @Override%0A    public Optional%3CCommandSource%3E getCommandSource() %7B%0A        return Optional.of(this);%0A    %7D%0A%0A    @Override%0A    public SubjectCollection getContainingCollection() %7B%0A        return Sponge.getServer().getConsole().getContainingCollection();%0A    %7D%0A%0A    @Override%0A    public SubjectData getSubjectData() %7B%0A        return Sponge.getServer().getConsole().getSubjectData();%0A    %7D%0A%0A    @Override%0A    public SubjectData getTransientSubjectData() %7B%0A        return Sponge.getServer().getConsole().getTransientSubjectData();%0A    %7D%0A%0A    @Override%0A    public boolean hasPermission(Set%3CContext%3E set, String s) %7B%0A        return true;%0A    %7D%0A%0A    @Override%0A    public Tristate getPermissionValue(Set%3CContext%3E set, String s) %7B%0A        return Tristate.TRUE;%0A    %7D%0A%0A    @Override%0A    public boolean isChildOf(Set%3CContext%3E set, Subject subject) %7B%0A        return true;%0A    %7D%0A%0A    @Override%0A    public List%3CSubject%3E getParents(Set%3CContext%3E set) %7B%0A        return ImmutableList.of();%0A    %7D%0A%7D%0A

Add command sender logging support for Sponge