mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Add a server config setting to allow or disallow /os rename
This commit is contained in:
parent
19ac43a746
commit
69ef58fd9c
@ -473,6 +473,11 @@ namespace MCGalaxy.Commands.World {
|
|||||||
"&H With <name>, renames to 'yourname[name]'.",
|
"&H With <name>, renames to 'yourname[name]'.",
|
||||||
};
|
};
|
||||||
static void HandleRename(Player p, string args) {
|
static void HandleRename(Player p, string args) {
|
||||||
|
if (!Server.Config.OSRenameAllowed) {
|
||||||
|
p.Message("This server does not allow renaming os realms.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (args.Length > 0 && !Formatter.IsValidName(p, args, "os name", Player.USERNAME_ALPHABET)) {
|
if (args.Length > 0 && !Formatter.IsValidName(p, args, "os name", Player.USERNAME_ALPHABET)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -146,6 +146,8 @@ namespace MCGalaxy
|
|||||||
public bool HigherRankTP = true;
|
public bool HigherRankTP = true;
|
||||||
[ConfigPerm("os-perbuild-default", "Other", LevelPermission.Owner)]
|
[ConfigPerm("os-perbuild-default", "Other", LevelPermission.Owner)]
|
||||||
public LevelPermission OSPerbuildDefault = LevelPermission.Owner;
|
public LevelPermission OSPerbuildDefault = LevelPermission.Owner;
|
||||||
|
[ConfigBool("os-rename-allowed", "Other", true)]
|
||||||
|
public bool OSRenameAllowed = true;
|
||||||
[ConfigBool("protect-staff-ips", "Other", true)]
|
[ConfigBool("protect-staff-ips", "Other", true)]
|
||||||
public bool ProtectStaffIPs = true;
|
public bool ProtectStaffIPs = true;
|
||||||
[ConfigBool("classicube-account-plus", "Other", false)]
|
[ConfigBool("classicube-account-plus", "Other", false)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user