chore: better toggle text

This commit is contained in:
əlemi 2023-02-19 23:47:23 +01:00
parent 15a2b1ac09
commit 95f828c282
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -82,11 +82,11 @@ public abstract class Module {
T value = ctx.getArgument(name, clazz); T value = ctx.getArgument(name, clazz);
conf.set(value); conf.set(value);
conf.save(); conf.save();
log(String.format("> %s -> %s", String.join(".", conf.getPath()), conf.get().toString())); log(String.format("> %s -> %s <", String.join(".", conf.getPath()), conf.get().toString()));
return 1; return 1;
})) }))
.executes(ctx -> { .executes(ctx -> {
log(String.format("> %s: %s", String.join(".", conf.getPath()), conf.get().toString())); log(String.format("> %s: %s <", String.join(".", conf.getPath()), conf.get().toString()));
return 1; return 1;
}) })
) )
@ -118,11 +118,11 @@ public abstract class Module {
T value = ctx.getArgument(name, clazz); T value = ctx.getArgument(name, clazz);
conf.set(value); conf.set(value);
conf.save(); conf.save();
log(String.format("> %s -> %s", String.join(".", conf.getPath()), conf.get().toString())); log(String.format("> %s -> %s <", String.join(".", conf.getPath()), conf.get().toString()));
return 1; return 1;
})) }))
.executes(ctx -> { .executes(ctx -> {
log(String.format("> %s: %s", name, conf.get().toString())); log(String.format("> %s: %s <", name, conf.get().toString()));
return 1; return 1;
}) })
) )
@ -144,7 +144,7 @@ public abstract class Module {
this.enabled.set(true); this.enabled.set(true);
// this.enabled.save(); // this.enabled.save();
this.onEnabled(); this.onEnabled();
log(String.format("%s enabled", this.name)); log(String.format("%s ON", this.name));
} }
public final void disable() { public final void disable() {
@ -152,6 +152,6 @@ public abstract class Module {
this.enabled.set(false); this.enabled.set(false);
// this.enabled.save(); // this.enabled.save();
this.onDisabled(); this.onDisabled();
log(String.format("%s disabled", this.name)); log(String.format("%s OFF", this.name));
} }
} }