Skip to content

Commit

Permalink
Fixed an issue
Browse files Browse the repository at this point in the history
where you cant change the decoration type
  • Loading branch information
Minecraftian14 committed May 2, 2021
1 parent 4d70ece commit 5655209
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public Logger_MethodImplierBody(StringsConsumer consumer) {

@Override
public void prt(String... msg) {
Decoration decoration = Decorations.get(Decorations.CONSOLE);
Decoration decoration = Decorations.get(decorator_name);
writer.consume(decoration.decorate(msg));
}

@Override
public void prt(Object... obj) {
Decoration decoration = Decorations.get(Decorations.CONSOLE);
Decoration decoration = Decorations.get(decorator_name);
String[] stf = new String[obj.length];
for (int i = 0; i < stf.length; i++) stf[i] = obj[i].toString();
writer.consume(decoration.decorate(stf));
Expand All @@ -47,7 +47,7 @@ public void raw(String raw) {

@Override
public StringsConsumer prtf(String... format) {
Decoration decoration = Decorations.getSpecific(null,Decorations.CONSOLE, format);
Decoration decoration = Decorations.getSpecific(null,decorator_name, format);
return msg -> writer.consume(decoration.decorate(msg));
}

Expand All @@ -60,13 +60,13 @@ private class OurPacket extends Packet{

@Override
public void prt(String... msg) {
Decoration decoration = Decorations.get(Decorations.CONSOLE);
Decoration decoration = Decorations.get(decorator_name);
builder.append(decoration.decorate(msg));
}

@Override
public void prt(Object... obj) {
Decoration decoration = Decorations.get(Decorations.CONSOLE);
Decoration decoration = Decorations.get(decorator_name);
String[] stf = new String[obj.length];
for (int i = 0; i < stf.length; i++) stf[i] = obj[i].toString();
builder.append(decoration.decorate(stf));
Expand All @@ -79,7 +79,7 @@ public void raw(String raw) {

@Override
public StringsConsumer prtf(String... format) {
Decoration decoration = Decorations.getSpecific(null,Decorations.CONSOLE, format);
Decoration decoration = Decorations.getSpecific(null,decorator_name, format);
return msg -> builder.append(decoration.decorate(msg));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void test_NICEFormatting() {
FLog log = FLog.getNew();

// RawFileDecoration.setPartnerDecorationDecoration(TagDecoration::new);
// log.setDecorationType(Decorations.RAW);
log.setDecorationType(Decorations.TAG);

log.prt("1", "Useless Sentences", "Some boring text ahead...",
"So here we have some totally boring text just " +
Expand Down

0 comments on commit 5655209

Please sign in to comment.