mirror of
https://github.com/TotalFreedomMC/TFGuilds.git
synced 2024-12-22 07:55:03 +00:00
Merge pull request #4 from AtlasMediaGroup/FS-134
Save the data after removing player from guild rank
This commit is contained in:
commit
fa33dec483
2 changed files with 5 additions and 7 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,7 +1,3 @@
|
|||
/.idea/artifacts
|
||||
/.idea/libraries
|
||||
/.idea/workspace.xml
|
||||
/.idea/modules.xml
|
||||
/.idea/uiDesigner.xml
|
||||
/.idea/
|
||||
target/
|
||||
out/
|
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue