Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void aoColetar(PlayerPickupItemEvent e) {
- Player p = e.getPlayer();
- if (e.getItem().getItemStack().equals(new ItemStack(Material.COAL))) {
- ActionBarAPI.sendActionBar(p, "§8Você coletou Carvão!");
- } else if(e.getItem().getItemStack().equals(new ItemStack(Material.IRON_INGOT))) {
- ActionBarAPI.sendActionBar(p, "§8Você coletou Ferro!");
- } else if(e.getItem().getItemStack().equals(new ItemStack(Material.GOLD_INGOT))) {
- ActionBarAPI.sendActionBar(p, "§8Você coletou Ouro!");
- } else if (e.getItem().getItemStack().equals(new ItemStack(Material.INK_SACK, (short)4))) {
- ActionBarAPI.sendActionBar(p, "§8Você coletou Lapis Lazuli!");
- } else if (e.getItem().getItemStack().equals(new ItemStack(Material.REDSTONE))) {
- ActionBarAPI.sendActionBar(p, "§8Você coletou Redstone!");
- } else if (e.getItem().getItemStack().equals(new ItemStack(Material.DIAMOND))) {
- ActionBarAPI.sendActionBar(p, "§8Você coletou Diamante!");
- } else if (e.getItem().getItemStack().equals(new ItemStack(Material.EMERALD))) {
- ActionBarAPI.sendActionBar(p, "§8Você coletou Esmeralda!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment