From 9c66b78ff3f67ca135ea7e46402f3bce9529ff96 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Wed, 12 Jul 2017 15:21:04 +1000 Subject: [PATCH] fix ranks losing their blocks perms after modifying ranks in gui, fixes #470 --- MCGalaxy/Player/Group/Group.List.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MCGalaxy/Player/Group/Group.List.cs b/MCGalaxy/Player/Group/Group.List.cs index ec35c5a8d..888b8e346 100644 --- a/MCGalaxy/Player/Group/Group.List.cs +++ b/MCGalaxy/Player/Group/Group.List.cs @@ -28,10 +28,16 @@ namespace MCGalaxy { public static Group GuestRank { get { return Find(LevelPermission.Guest); } } public static Group NobodyRank { get { return Find(LevelPermission.Nobody); } } public static Group standard; + static bool reloading; public static void Register(Group grp) { GroupList.Add(grp); grp.LoadPlayers(); + + if (reloading) { + grp.SetUsableBlocks(); + grp.SetUsableCommands(); + } OnGroupLoadedEvent.Call(grp); } @@ -60,9 +66,10 @@ namespace MCGalaxy { GroupList.Sort((a, b) => a.Permission.CompareTo(b.Permission)); standard = Find(ServerConfig.DefaultRankName); - if (standard == null) standard = GuestRank; + if (standard == null) standard = GuestRank; OnGroupLoadEvent.Call(); + reloading = true; SaveList(GroupList); }