Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SidebarLine#createEmpty not using the passed value #3

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/java/eu/pb4/sidebars/api/lines/SidebarLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static SidebarLine create(int value, Text text, NumberFormat format) {
* @return SidebarLine
*/
static SidebarLine createEmpty(int value) {
return new AbstractSidebarLine() {
AbstractSidebarLine abstractSidebarLine = new AbstractSidebarLine() {
@Override
public Text getText(ServerPlayNetworkHandler handler) {
return Text.empty();
Expand All @@ -96,5 +96,7 @@ public NumberFormat getNumberFormat(ServerPlayNetworkHandler handler) {
return BlankNumberFormat.INSTANCE;
}
};
abstractSidebarLine.setValue(value);
return abstractSidebarLine;
}
}