Add Sender#getNameWithLocation

This commit is contained in:
Luck
2017-11-02 18:51:59 +00:00
Unverified
parent 0f10bb0bc9
commit b7541c43c8
13 changed files with 113 additions and 126 deletions
@@ -456,24 +456,7 @@ public class LPSpongePlugin implements LuckPermsPlugin {
@Override
public Sender getConsoleSender() {
if (!game.isServerAvailable()) {
return new ImporterSender(this) {
@Override
public String getName() {
LuckPermsConfiguration config = getPlatform().getConfiguration();
return config == null ? Constants.CONSOLE_NAME.apply(null) : Constants.CONSOLE_NAME.apply(config.get(ConfigKeys.SERVER));
}
@Override
public UUID getUuid() {
return Constants.CONSOLE_UUID;
}
@Override
public boolean isImport() {
return false;
}
return new ImporterSender(this, Constants.CONSOLE_UUID, Constants.CONSOLE_NAME) {
@Override
protected void consumeMessage(String s) {
logger.info(s);
@@ -51,7 +51,7 @@ public class SpongeSenderFactory extends SenderFactory<CommandSource> {
if (source instanceof Player) {
return source.getName();
}
return getConsoleName();
return Constants.CONSOLE_NAME;
}
@Override