Add better /ld uploadlogs info, name placeholder now does displayname too

This commit is contained in:
libraryaddict 2020-08-11 08:08:55 +12:00
parent 6dd16a545e
commit 9ffbd9e272
2 changed files with 9 additions and 9 deletions

View file

@ -15,6 +15,7 @@ import me.libraryaddict.disguise.utilities.params.ParamInfoManager;
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandExecutor;
@ -50,7 +51,9 @@ public abstract class DisguiseBaseCommand implements CommandExecutor {
protected boolean isNotPremium(CommandSender sender) {
if (sender instanceof Player && !sender.isOp() &&
(!LibsPremium.isPremium() || LibsPremium.getPaidInformation() == LibsPremium.getPluginInformation())) {
sender.sendMessage(ChatColor.RED + "This is the free version of Lib's Disguises, player commands are limited to console and Operators only! Purchase the plugin for non-admin usage!");
sender.sendMessage(ChatColor.RED +
"This is the free version of Lib's Disguises, player commands are limited to console and " +
"Operators only! Purchase the plugin for non-admin usage!");
return true;
}
@ -211,10 +214,10 @@ public abstract class DisguiseBaseCommand implements CommandExecutor {
if (team == null) {
team = ((Player) player).getScoreboard().getEntryTeam(((Player) player).getUniqueId().toString());
}
if (team == null) {
return player.getName();
}
if (team == null || (StringUtils.isEmpty(team.getPrefix()) && StringUtils.isEmpty(team.getSuffix()))) {
return ((Player) player).getDisplayName();
}
return team.getPrefix() + team.getColor() + player.getName() + team.getSuffix();

View file

@ -17,11 +17,8 @@ import java.io.*;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.util.*;
import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Created by libraryaddict on 18/06/2020.
@ -101,7 +98,7 @@ public class LDUploadLogs implements LDCommand {
@Override
public List<String> getTabComplete() {
return Collections.singletonList("uploadlogs");
return Arrays.asList("uploadlog", "uploadlogs", "uploadconfig", "uploadconfigs");
}
@Override