diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt index 624ad09fb..ba2834900 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt @@ -6,6 +6,7 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams import net.minecraft.world.level.storage.loot.predicates.InvertedLootItemCondition import net.minecraft.world.level.storage.loot.predicates.LootItemCondition import net.minecraft.world.level.storage.loot.predicates.LootItemConditionType +import net.neoforged.neoforge.common.util.FakePlayer import ru.dbotthepony.mc.otm.NULLABLE_MINECRAFT_SERVER import ru.dbotthepony.mc.otm.data.get import ru.dbotthepony.mc.otm.registry.MLootItemConditions @@ -22,12 +23,12 @@ object KilledByRealPlayerOrIndirectly : LootItemCondition, LootItemCondition.Bui if (killer != null) { val owner = killer.owner - if (owner != null /*&& owner !is FakePlayer*/) { + if (owner != null && owner !is FakePlayer) { return true } val ply = NULLABLE_MINECRAFT_SERVER?.playerList?.getPlayer(killer.ownerUUID ?: return false) - return ply != null //&& ply !is FakePlayer + return ply != null && ply !is FakePlayer } }