GetIpOrThrow

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

View File

@ -217,6 +217,13 @@ public abstract class SenderEntity<E extends SenderEntity<E>> extends Entity<E>
{ {
return MixinPlayed.get().getIp(this.getIdOrThrow()); 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() public boolean isVisible()
{ {