mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-25 01:49:30 +00:00
减少宠物判断
This commit is contained in:
@@ -40,8 +40,7 @@ public class EntityUtils {
|
||||
}
|
||||
|
||||
public static boolean isPetOwner(Player player, Entity entity) {
|
||||
if (!(entity instanceof Sittable sittable)) return false;
|
||||
return sittable instanceof Tameable tameable
|
||||
return entity instanceof Tameable tameable
|
||||
&& tameable.isTamed()
|
||||
&& tameable.getOwnerUniqueId() == player.getUniqueId();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user