remove hud config notification (now automatically bound to GRAVE); fix ignored manager causing concurrent modification errors

This commit is contained in:
noil 2019-11-21 20:44:48 -05:00
parent cdc51afaf2
commit 0688680866
4 changed files with 5 additions and 13 deletions

View File

@ -14,8 +14,6 @@ import java.io.*;
*/
public final class HudConfig extends Configurable {
public static boolean FIRST_HUD_RUN = true;
public HudConfig() {
super(ConfigManager.CONFIG_PATH + "Hud.cfg");
}
@ -36,11 +34,6 @@ public final class HudConfig extends Configurable {
while ((line = reader.readLine()) != null) {
final String[] split = line.split(":");
if (split[0].equals("FIRST_HUD_RUN")) {
FIRST_HUD_RUN = Boolean.valueOf(split[1]);
continue;
}
final HudComponent component = Seppuku.INSTANCE.getHudManager().findComponent(split[0]);
if (component != null) {
if (!split[1].equals("")) {
@ -87,9 +80,6 @@ public final class HudConfig extends Configurable {
final BufferedWriter writer = new BufferedWriter(new FileWriter(this.getPath()));
writer.write("FIRST_HUD_RUN" + ":" + FIRST_HUD_RUN);
writer.newLine();
if (Seppuku.INSTANCE.getHudManager().getComponentList() != null) {
for (HudComponent component : Seppuku.INSTANCE.getHudManager().getComponentList()) {
writer.write(component.getName() + ":" + component.getX() + ":" + component.getY() + ":" + component.isVisible());

View File

@ -23,6 +23,7 @@ public final class TutorialComponent extends PopupComponent {
this.setTextData(tutorialData);
this.setVisible(true);
this.setSnappable(false);
this.setW(200);
this.setH(173);

View File

@ -2,8 +2,9 @@ package me.rigamortis.seppuku.impl.management;
import me.rigamortis.seppuku.Seppuku;
import me.rigamortis.seppuku.api.ignore.Ignored;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
/**
* Author Seth
@ -11,7 +12,7 @@ import java.util.List;
*/
public final class IgnoredManager {
private List<Ignored> ignoredList = new ArrayList<>();
private List<Ignored> ignoredList = new CopyOnWriteArrayList<>();
public void add(String name) {
this.ignoredList.add(new Ignored(name));

View File

@ -17,7 +17,7 @@ public final class HudEditorModule extends Module {
private boolean open;
public HudEditorModule() {
super("HudEditor", new String[]{"HudEdit", "HEdit"}, "Displays a menu to modify the hud", "NONE", -1, ModuleType.UI);
super("HudEditor", new String[]{"HudEdit", "HEdit"}, "Displays a menu to modify the hud", "GRAVE", -1, ModuleType.UI);
this.setHidden(true);
}