mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +01:00
Added real name boolean option for the /list command (#3117)
This commit is contained in:
parent
ad98fc4121
commit
b08d380643
@ -162,6 +162,8 @@ public interface ISettings extends IConf {
|
|||||||
|
|
||||||
boolean isEcoLogUpdateEnabled();
|
boolean isEcoLogUpdateEnabled();
|
||||||
|
|
||||||
|
boolean realNamesOnList();
|
||||||
|
|
||||||
boolean removeGodOnDisconnect();
|
boolean removeGodOnDisconnect();
|
||||||
|
|
||||||
boolean changeDisplayName();
|
boolean changeDisplayName();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.earth2me.essentials;
|
package com.earth2me.essentials;
|
||||||
|
|
||||||
import com.earth2me.essentials.utils.FormatUtil;
|
import com.earth2me.essentials.utils.FormatUtil;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -27,6 +28,9 @@ public class PlayerList {
|
|||||||
}
|
}
|
||||||
user.setDisplayNick();
|
user.setDisplayNick();
|
||||||
groupString.append(user.getDisplayName());
|
groupString.append(user.getDisplayName());
|
||||||
|
if (ess.getSettings().realNamesOnList() && !ChatColor.stripColor(user.getDisplayName()).equals(user.getName())) {
|
||||||
|
groupString.append(" (").append(user.getName()).append(")");
|
||||||
|
}
|
||||||
groupString.append("\u00a7f");
|
groupString.append("\u00a7f");
|
||||||
}
|
}
|
||||||
return groupString.toString();
|
return groupString.toString();
|
||||||
|
@ -791,6 +791,11 @@ public class Settings implements net.ess3.api.ISettings {
|
|||||||
return economyLogUpdate;
|
return economyLogUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean realNamesOnList() {
|
||||||
|
return config.getBoolean("real-names-on-list", false);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean _isEcoLogUpdateEnabled() {
|
public boolean _isEcoLogUpdateEnabled() {
|
||||||
return config.getBoolean("economy-log-update-enabled", false);
|
return config.getBoolean("economy-log-update-enabled", false);
|
||||||
}
|
}
|
||||||
|
@ -381,6 +381,9 @@ list:
|
|||||||
# Uncomment the line below to simply list all players with no grouping
|
# Uncomment the line below to simply list all players with no grouping
|
||||||
#Players: '*'
|
#Players: '*'
|
||||||
|
|
||||||
|
# Displays real names in /list next to players who are using a nickname.
|
||||||
|
real-names-on-list: false
|
||||||
|
|
||||||
# More output to the console.
|
# More output to the console.
|
||||||
debug: false
|
debug: false
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user