Merge pull request #4 from AtlasMediaGroup/FS-134

Save the data after removing player from guild rank
This commit is contained in:
Nathan Curran 2021-03-20 16:37:00 +11:00 committed by GitHub
commit fa33dec483
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

6
.gitignore vendored
View file

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

View file

@ -56,12 +56,13 @@ public class SetRankSubcommand extends Common implements CommandExecutor
return true;
}
String name = StringUtils.join(args, " ", 2, args.length);
if (name.toLowerCase().equals("none"))
String name = StringUtils.join(args, " ", 2, args.length).toLowerCase();
if (name.equals("none"))
{
for (GuildRank gr : guild.getRanks())
{
gr.getMembers().remove(r.getUniqueId());
gr.save();
}
sender.sendMessage(tl(PREFIX + "Removed the rank of %s%" + r.getName() + "%p% in your guild."));
@ -80,6 +81,7 @@ public class SetRankSubcommand extends Common implements CommandExecutor
for (GuildRank gr : guild.getRanks())
{
gr.getMembers().remove(r.getUniqueId());
gr.save();
}
rank.getMembers().add(r.getUniqueId());