Save data when removing a player from rank (FS-134)

This commit is contained in:
Nathan Curran 2021-03-07 15:43:08 +11:00
parent 3c412ca0e8
commit 02e1df6e9c
No known key found for this signature in database
GPG key ID: B3A964B30C2E56B8
2 changed files with 3 additions and 6 deletions

6
.gitignore vendored
View file

@ -1,7 +1,3 @@
/.idea/artifacts /.idea/
/.idea/libraries
/.idea/workspace.xml
/.idea/modules.xml
/.idea/uiDesigner.xml
target/ target/
out/ out/

View file

@ -57,7 +57,7 @@ public class SetRankSubcommand extends Common implements CommandExecutor
} }
String name = StringUtils.join(args, " ", 2, args.length); String name = StringUtils.join(args, " ", 2, args.length);
if (name.toLowerCase().equals("none")) if (name.equalsIgnoreCase("none"))
{ {
for (GuildRank gr : guild.getRanks()) for (GuildRank gr : guild.getRanks())
{ {
@ -80,6 +80,7 @@ public class SetRankSubcommand extends Common implements CommandExecutor
for (GuildRank gr : guild.getRanks()) for (GuildRank gr : guild.getRanks())
{ {
gr.getMembers().remove(r.getUniqueId()); gr.getMembers().remove(r.getUniqueId());
gr.save();
} }
rank.getMembers().add(r.getUniqueId()); rank.getMembers().add(r.getUniqueId());