0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-20 09:16:20 +02:00

Save on setColor()

This commit is contained in:
HiddenaltCode 2021-08-08 11:32:04 +03:00
parent 3b0a1c9c75
commit 9c1d8b8e43

View File

@ -5,6 +5,8 @@ import com.google.gson.JsonPrimitive;
import java.awt.Color;
import java.util.LinkedHashSet;
import java.util.Set;
import net.wurstclient.WurstClient;
import net.wurstclient.clickgui.Component;
import net.wurstclient.clickgui.components.ColorComponent;
import net.wurstclient.keybinds.PossibleKeybind;
@ -31,6 +33,7 @@ public class ColorSetting extends Setting
public final void setColor(Color color)
{
this.color = color;
WurstClient.INSTANCE.saveSettings();
}
public Color getColor()
@ -75,7 +78,7 @@ public class ColorSetting extends Setting
String command = ".setcolor " + featureName.toLowerCase() + " ";
command = command + getName().toLowerCase().replace(" ", "_") + " ";
LinkedHashSet<PossibleKeybind> pkb = new LinkedHashSet();
LinkedHashSet<PossibleKeybind> pkb = new LinkedHashSet<>();
pkb.add(new PossibleKeybind(command, "Set color of " + fullName));
return pkb;