mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Fix an possible NPE
Former-commit-id: f8dc6d89ab76d236b6127a7645a9b5eeaca87a2c [formerly e9872021fca2ba30007b79d1efdf836d293a8220] Former-commit-id: dbb0768e731783d06f5ffa0f7317ae8e8d51ebd2
This commit is contained in:
1 parent
91007c775d
commit
79bc69be81
1 file changed
+7
-2
@@ -852,8 +852,13 @@ public class MsgUtil {
|
||||
if (livingEntity instanceof Tameable) {
|
||||
Tameable tamedEntity = (Tameable) livingEntity;
|
||||
AnimalTamer tamer = tamedEntity.getOwner();
|
||||
Util.sendMessageToOps(ChatColor.RED + "Exploiter: " + "LivingEntity=" + livingEntity.getType()
|
||||
.name() + "; Tamer=" + Bukkit.getOfflinePlayer(tamer.getUniqueId()));
|
||||
if (tamer != null) {
|
||||
Util.sendMessageToOps(ChatColor.RED + "Exploiter: " + "LivingEntity=" + livingEntity.getType()
|
||||
.name() + "; Tamer=" + Bukkit.getOfflinePlayer(tamer.getUniqueId()));
|
||||
} else {
|
||||
Util.sendMessageToOps(ChatColor.RED + "Exploiter: " + "LivingEntity=" + livingEntity.getType()
|
||||
.name());
|
||||
}
|
||||
}
|
||||
Util.sendMessageToOps(ChatColor.RED + "Exploiter: " + "LivingEntity=" + livingEntity.getType().name());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user