Update annotations

This commit is contained in:
Marcel Konrad
2021-12-11 16:30:44 +01:00
parent cbfda9244b
commit c22a4d8390
2 changed files with 5 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
package exopandora.worldhandler.util;
import javax.annotation.Nullable;
import net.minecraft.ChatFormatting;
import net.minecraft.nbt.StringTag;
import net.minecraft.nbt.Tag;
@@ -69,6 +71,7 @@ public class MutableTextComponent extends TextComponent
return FormattedCharSequence.forward(string, this.getStyle());
}
@Nullable
public Tag serialize()
{
if(this.getContents() != null && !this.getContents().isEmpty())

View File

@@ -1,5 +1,6 @@
package exopandora.worldhandler.util;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.nbt.StringTag;
@@ -37,6 +38,7 @@ public class SignText extends MutableTextComponent
return this.getStyle().getClickEvent() != null && this.getStyle().getClickEvent().getAction() == Action.RUN_COMMAND && this.getStyle().getClickEvent().getValue() != null;
}
@Nonnull
@Override
public Tag serialize()
{