GetIpOrThrow

This commit is contained in:
Magnus Ulf 2020-03-20 13:19:55 +01:00
parent 81bd0e6012
commit fc7e8e7597

View File

@ -218,6 +218,13 @@ public abstract class SenderEntity<E extends SenderEntity<E>> extends Entity<E>
return MixinPlayed.get().getIp(this.getIdOrThrow());
}
public String getIpOrThrow()
{
String ip = this.getIp();
if (ip == null) throw new NullPointerException("ip");
return ip;
}
public boolean isVisible()
{
return MixinVisibility.get().isVisible(this);