Begin adding stricter null annotations to prepare for 1.11

This commit is contained in:
mezz committed 2017-02-05 23:47:40 -08:00
1 parent 4140ba7d7f
commit 16b955b443
330 files changed
+2302 -921

No files matched your search

@@ -11,8 +11,12 @@ import binnie.craftgui.events.EventHandler;
import binnie.craftgui.events.EventMouse;
import binnie.craftgui.resource.minecraft.CraftGUITexture;
import javax.annotation.Nullable;
public class ControlButton extends Control {
@Nullable
private ControlText textWidget;
@Nullable
private String text;
public ControlButton(final IWidget parent, final int x, final int y, final int width, final int height) {
@@ -39,10 +43,14 @@ public class ControlButton extends Control {
@Override
public void onUpdateClient() {
if (this.textWidget != null) {
this.textWidget.setValue(this.getText());
String text = this.getText();
if (text != null) {
this.textWidget.setValue(text);
}
}
}
@Nullable
public String getText() {
return this.text;
}