File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Plan/nukkit/src/main/java/com/djrapitops/plan/gathering/listeners/nukkit Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1818
1919import cn .nukkit .Player ;
2020import cn .nukkit .entity .Entity ;
21+ import cn .nukkit .entity .EntityTameable ;
2122import cn .nukkit .entity .item .EntityEndCrystal ;
22- import cn .nukkit .entity .passive .EntityTameable ;
2323import cn .nukkit .entity .projectile .EntityProjectile ;
2424import cn .nukkit .event .EventHandler ;
2525import cn .nukkit .event .EventPriority ;
@@ -131,13 +131,13 @@ public String findWeapon(Entity dead) {
131131 EntityDamageEvent entityDamageEvent = dead .getLastDamageCause ();
132132 Entity killer = ((EntityDamageByEntityEvent ) entityDamageEvent ).getDamager ();
133133 if (killer instanceof Player ) return getItemInHand ((Player ) killer );
134- if (killer instanceof EntityTameable ) return getPetType (( EntityTameable ) killer );
134+ if (killer instanceof EntityTameable ) return getPetType (killer );
135135
136136 // EntityProjectile, EntityEndCrystal and all other causes that are not known yet
137137 return new EntityNameFormatter ().apply (killer .getName ());
138138 }
139139
140- private String getPetType (EntityTameable tameable ) {
140+ private String getPetType (Entity tameable ) {
141141 return tameable .getName ();
142142 }
143143
@@ -156,7 +156,7 @@ private Optional<Player> getShooter(EntityProjectile projectile) {
156156 }
157157
158158 private Optional <Player > getOwner (EntityTameable tameable ) {
159- if (!tameable .isTamed ()) {
159+ if (!tameable .hasOwner ()) {
160160 return Optional .empty ();
161161 }
162162
You can’t perform that action at this time.
0 commit comments