1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-18 04:21:31 +02:00

Disabling player list updates by default (can mess with tab completion)

Hopefully this will be reverted if/when patch is found.
This commit is contained in:
KHobbits
2012-03-23 00:15:22 +00:00
parent c5eb1bb105
commit 42d01471d3
4 changed files with 21 additions and 7 deletions

View File

@@ -128,6 +128,8 @@ public interface ISettings extends IConf
boolean changeDisplayName(); boolean changeDisplayName();
boolean changePlayerListName();
boolean isPlayerCommand(String string); boolean isPlayerCommand(String string);
boolean useBukkitPermissions(); boolean useBukkitPermissions();

View File

@@ -610,6 +610,12 @@ public class Settings implements ISettings
return config.getBoolean("change-displayname", true); return config.getBoolean("change-displayname", true);
} }
@Override
public boolean changePlayerListName()
{
return config.getBoolean("change-playerlist", false);
}
@Override @Override
public boolean useBukkitPermissions() public boolean useBukkitPermissions()
{ {

View File

@@ -328,15 +328,18 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{ {
name = Util.stripFormat(name); name = Util.stripFormat(name);
} }
try if (ess.getSettings().changePlayerListName())
{ {
setPlayerListName(name); try
}
catch (IllegalArgumentException e)
{
if (ess.getSettings().isDebug())
{ {
logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player."); setPlayerListName(name);
}
catch (IllegalArgumentException e)
{
if (ess.getSettings().isDebug())
{
logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player.");
}
} }
} }
} }

View File

@@ -33,6 +33,9 @@ nickname-prefix: '~'
# Disable this if you have any other plugin, that modifies the displayname of a user. # Disable this if you have any other plugin, that modifies the displayname of a user.
change-displayname: true change-displayname: true
# When this option is enabled, the (tab) player list will be updated with nicknames and colours.
#change-playerlist: true
# Adds the prefix and suffix to the displayname of the player, so it will be displayed in messages and lists. # Adds the prefix and suffix to the displayname of the player, so it will be displayed in messages and lists.
# The prefix/suffix can be set using Permissions, Group Manager or PermissionsEx. # The prefix/suffix can be set using Permissions, Group Manager or PermissionsEx.
# The value of change-displayname (above) has to be true. # The value of change-displayname (above) has to be true.