From 6bdc91ce80b7379605e15338e8a59ca482f8b828 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 15 Dec 2019 18:25:43 +0200 Subject: Add nullability annotations to WToggleButton.label-related code --- .../java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java index e860a5f..4c75113 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WToggleButton.java @@ -21,7 +21,7 @@ public class WToggleButton extends WWidget { protected Identifier onImage; protected Identifier offImage; - protected Text label = null; + @Nullable protected Text label = null; protected boolean isOn = false; @Nullable protected Consumer onToggle = null; @@ -124,11 +124,12 @@ public class WToggleButton extends WWidget { return this; } + @Nullable public Text getLabel() { return label; } - public void setLabel(Text label) { + public void setLabel(@Nullable Text label) { this.label = label; } -- cgit