Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/main/java/fr/communaywen/core/listeners/BabyFuzeListener.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package fr.communaywen.core.listeners;

import dev.lone.itemsadder.api.CustomEntity;
import dev.lone.itemsadder.api.Events.CustomEntityDeathEvent;
import fr.communaywen.core.credit.Credit;
import fr.communaywen.core.credit.Feature;
import fr.communaywen.core.utils.ItemBuilder;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Villager;
Expand Down Expand Up @@ -37,6 +40,12 @@ public void onVillagerDeath(EntityDeathEvent e) {
case 0:
CustomEntity entity = CustomEntity.spawn("omc_entities:babyfuze", player.getLocation());
entities.put(player.getUniqueId(), entity);

if(player.getUniqueId().equals(UUID.fromString("e5056dba-daa5-4b4e-a08c-eac27a4d2c07"))){
player.playSound(entity.getLocation(), "omc_sounds:babyfuze.martinouxx", 1f, 1f);
} else {
player.playSound(entity.getLocation(), "omc_sounds:babyfuze.salut", 1f, 1f);
}
break;
default:
break;
Expand All @@ -56,4 +65,13 @@ public void onPlayerDeath(PlayerDeathEvent e) {
}
}

@EventHandler
public void onCustomEntityDeah(CustomEntityDeathEvent e){
Entity entity = e.getEntity();

if(e.getNamespacedID().equalsIgnoreCase("omc_entities:babyfuze")){
entity.getLocation().getWorld().dropItemNaturally(entity.getLocation(), new ItemBuilder(Material.PLAYER_HEAD).setSkullOwner("FuzeIII").setName("§6§lTête de Fuze").toItemStack());
}
}

}