diff --git a/MCGalaxy/Commands/Overseer.cs b/MCGalaxy/Commands/Overseer.cs index 9f08011e2..a0edd11f9 100644 --- a/MCGalaxy/Commands/Overseer.cs +++ b/MCGalaxy/Commands/Overseer.cs @@ -473,6 +473,11 @@ namespace MCGalaxy.Commands.World { "&H With , renames to 'yourname[name]'.", }; 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)) { return; } diff --git a/MCGalaxy/Server/ServerConfig.cs b/MCGalaxy/Server/ServerConfig.cs index 38c9bda89..df5c6d718 100644 --- a/MCGalaxy/Server/ServerConfig.cs +++ b/MCGalaxy/Server/ServerConfig.cs @@ -145,7 +145,9 @@ namespace MCGalaxy [ConfigBool("allow-tp-to-higher-ranks", "Other", true)] public bool HigherRankTP = true; [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)] public bool ProtectStaffIPs = true; [ConfigBool("classicube-account-plus", "Other", false)]