mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-24 17:12:03 +01:00
Separate config setting for prefix/suffix
This commit is contained in:
parent
a20f2b71da
commit
3cedfeef2c
@ -130,4 +130,6 @@ public interface ISettings extends IConf
|
|||||||
boolean isPlayerCommand(String string);
|
boolean isPlayerCommand(String string);
|
||||||
|
|
||||||
public boolean useBukkitPermissions();
|
public boolean useBukkitPermissions();
|
||||||
|
|
||||||
|
public boolean addPrefixSuffix();
|
||||||
}
|
}
|
||||||
|
@ -468,4 +468,9 @@ public class Settings implements ISettings
|
|||||||
{
|
{
|
||||||
return config.getBoolean("use-bukkit-permissions", false);
|
return config.getBoolean("use-bukkit-permissions", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean addPrefixSuffix()
|
||||||
|
{
|
||||||
|
return config.getBoolean("add-prefix-suffix", false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,6 +246,8 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ess.getSettings().addPrefixSuffix())
|
||||||
|
{
|
||||||
final String prefix = ess.getPermissionsHandler().getPrefix(this).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
|
final String prefix = ess.getPermissionsHandler().getPrefix(this).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
|
||||||
final String suffix = ess.getPermissionsHandler().getSuffix(this).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
|
final String suffix = ess.getPermissionsHandler().getSuffix(this).replace('&', '§').replace("{WORLDNAME}", this.getWorld().getName());
|
||||||
|
|
||||||
@ -255,6 +257,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
{
|
{
|
||||||
nickname.append("§f");
|
nickname.append("§f");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nickname.toString();
|
return nickname.toString();
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,11 @@ 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
|
||||||
|
|
||||||
|
# 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 value of change-displayname (above) has to be true.
|
||||||
|
add-prefix-suffix: false
|
||||||
|
|
||||||
# The delay, in seconds, required between /home, /tp, etc.
|
# The delay, in seconds, required between /home, /tp, etc.
|
||||||
teleport-cooldown: 0
|
teleport-cooldown: 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user