Skip to content

Commit 53cf757

Browse files
committed
provide level when creating new section
1 parent 9e18f74 commit 53cf757

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

editor/src/main/java/io/github/projectunified/minigamecore/editor/EditorStatusDisplay.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,10 @@ public abstract class EditorStatusDisplay<B, S, T> {
2222
* Create a new section
2323
*
2424
* @param builder the builder
25+
* @param level the section level
2526
* @return the section
2627
*/
27-
protected abstract S newSection(B builder);
28-
29-
/**
30-
* Add padding to the section
31-
*
32-
* @param section the section
33-
* @param level the padding level
34-
*/
35-
protected abstract void appendPadding(S section, int level);
28+
protected abstract S newSection(B builder, int level);
3629

3730
/**
3831
* Add key to the section
@@ -112,9 +105,8 @@ public T display(Editor<?> editor) {
112105
continue;
113106
}
114107

115-
S section = newSection(builder);
116-
117-
appendPadding(section, level);
108+
S section = newSection(builder, level);
109+
118110
appendKey(section, entry.key(), entry.fromCollection());
119111
if (value instanceof Collection<?>) {
120112
Collection<?> collection = (Collection<?>) value;

0 commit comments

Comments
 (0)