Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(e.getEntityType() == EntityType.ZOMBIE){
- Location drop = e.getEntity().getLocation();
- Location dropy1 = new Location (e.getEntity().getWorld(), e.getEntity().getLocation().getBlockX(), e.getEntity().getLocation().getBlockY()+1, e.getEntity().getLocation().getBlockZ());
- Material alt = dropy1.getBlock().getType();
- dropy1.getBlock().setType(Material.CHEST);
- Chest temp = (Chest) dropy1.getBlock().getState();
- ItemStack Star = new ItemStack(Material.NETHER_STAR, 1);
- ItemMeta Stars = Star.getItemMeta();
- Stars.setDisplayName("§9Seestern");
- Stars.setLore(Arrays.asList("§aTausche deine §9§lSeesterne §r§abeim §9§lSeestern Händler."));
- Star.setItemMeta(Stars);
- ItemStack key = new ItemStack(Material.TRIPWIRE_HOOK); //key
- ItemMeta keym = key.getItemMeta();
- keym.setDisplayName("§6Schlüssel");
- key.setItemMeta(keym);
- if(e.getEntity().getCustomName().equalsIgnoreCase("§6§lKlabautermann")){
- for(int i = 0; i < 36; i++){
- temp.getBlockInventory().setItem(i, key);
- }
- }else if(e.getEntity().getCustomName().equalsIgnoreCase("§c§lKlabautermann")){
- for(int i = 0; i < 36; i++){
- temp.getBlockInventory().setItem(i, Star);
- }
- }
- Bukkit.broadcastMessage("1");
- if(alt == Material.AIR){
- Bukkit.broadcastMessage("2");
- Bukkit.getServer().getScheduler().runTaskLater(plugin, new Runnable() {
- public void run() {
- Bukkit.broadcastMessage("3");
- dropy1.getBlock().breakNaturally();
- dropy1.getBlock().setType(alt);
- }
- }, 1L);
- }else{
- Bukkit.broadcastMessage("1a");
- Bukkit.getServer().getScheduler().runTaskLater(plugin, new Runnable() {
- public void run() {
- Bukkit.broadcastMessage("asd");
- dropy1.getBlock().breakNaturally();
- }
- }, 1L);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement