getting ids of nearby entitys ?

Discussion in 'Plugin Development' started by ahuby09, Apr 28, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    ahuby09

    so what im looking to do is make it so it gets nearby entitys by there id then tern them into mob eggs with the corresponding id is this possible if so plz explain how
     
  2. Offline

    mineart.at

    ahuby09
    PHP:
        private static final Map<EntityTypeShortspawneggs insertValues();
     
        private static 
    Map<EntityTypeShortinsertValues() {
            
    Map<EntityTypeShortresult = new HashMap<EntityTypeShort>();
            
    result.put(EntityType.CREEPER, (short1);
            
    //put your own values
            
    return Collections.unmodifiableMap(result);
        }
     
        public 
    boolean onCommand(CommandSender sCommand cString lString[] a) {
            if (
    l.equalsIgnoreCase("se")) {
                if (
    instanceof Player && a.length == 1) {
                    
    Player p = (Players;
                    
    int r Integer.parseInt(a[0]);
                    List<
    Entityp.getNearbyEntities(rrr);
                    for (
    Entity e n) {
                        
    e.getWorld()
                                .
    dropItem(
                                        
    e.getLocation()
                                                .
    add(new Vector(0.510.5)),
                                        new 
    ItemStack(Material.MONSTER_EGG1,
                                                
    spawneggs.get(e.getType())))
                                .
    setVelocity(new Vector(000));
                        
    e.remove();
                    }
                }
            }
            return 
    false;
        }
        }
     
Thread Status:
Not open for further replies.

Share This Page