Skip to content

Commit

Permalink
removed useless config save action
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanguygab committed Feb 13, 2021
1 parent 79ac0e6 commit 1171169
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,12 @@ public String setName(String value) {
String old = name;
name = value;
TABAdditions.getInstance().getConfig("").set("fakeplayers." + configname + ".name", value);
TABAdditions.getInstance().getConfig("").save();
return "&aFakePlayer's name changed from "+old+" to "+value+".";
}
public String setSkin(String value) {
String old = skin;
skin = value;
TABAdditions.getInstance().getConfig("").set("fakeplayers." + configname + ".skin", value);
TABAdditions.getInstance().getConfig("").save();
return "&aFakePlayer's skin changed from "+old+" to "+value+".";
}
public String setLatency(String value) {
Expand All @@ -156,7 +154,6 @@ public String setLatency(String value) {
if (num > 5) num = 5;
latency = num;
TABAdditions.getInstance().getConfig("").set("fakeplayers." + configname + ".latency", num);
TABAdditions.getInstance().getConfig("").save();
return "&aFakePlayer latency changed from "+old+" to "+num+".";
} catch (NumberFormatException ignored) {
return "&cCouldn't change FakePlayer's latency to "+name+", provided a number!";
Expand All @@ -166,17 +163,14 @@ public String setGroup(String value) {
String old = group;
group = value;
TABAdditions.getInstance().getConfig("").set("fakeplayers." + configname + ".group", value);
TABAdditions.getInstance().getConfig("").save();
return "&aFakePlayer's group changed from "+old+" to "+value+".";
}
public String setPrefix(String value) {
TABAdditions.getInstance().getConfig("").set("fakeplayers." + configname + ".prefix", value);
TABAdditions.getInstance().getConfig("").save();
return "&aFakePlayer's prefix changed to "+value+".";
}
public String setSuffix(String value) {
TABAdditions.getInstance().getConfig("").set("fakeplayers." + configname + ".suffix", value);
TABAdditions.getInstance().getConfig("").save();
return "&aFakePlayer's prefix changed to "+value+".";
}

Expand Down

0 comments on commit 1171169

Please sign in to comment.