From fc7e8e75975abf21a449054f4cdfca736f9872a4 Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Fri, 20 Mar 2020 13:19:55 +0100 Subject: [PATCH] GetIpOrThrow --- src/com/massivecraft/massivecore/store/SenderEntity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/massivecraft/massivecore/store/SenderEntity.java b/src/com/massivecraft/massivecore/store/SenderEntity.java index c6b8197b..2405c9bd 100644 --- a/src/com/massivecraft/massivecore/store/SenderEntity.java +++ b/src/com/massivecraft/massivecore/store/SenderEntity.java @@ -217,6 +217,13 @@ public abstract class SenderEntity> extends Entity { 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() {