Package org.bukkit.entity

Examples of org.bukkit.entity.Enderman


        }
      } else if (type.equalsIgnoreCase("charged")){
        Creeper creep = (Creeper) entity1;
        creep.setPowered(true);
      } else if (toSpawn == EntityType.ENDERMAN && ClosestMatches.material(type).size() > 0){
        Enderman enderman = (Enderman) entity1;
        enderman.setCarriedMaterial(new MaterialData(ClosestMatches.material(type).get(0)));
      } else if (toSpawn == EntityType.VILLAGER && ClosestMatches.villagerProfessions(type).size() > 0){
        Villager villager = (Villager) entity1;
        villager.setProfession(ClosestMatches.villagerProfessions(type).get(0));
      } else if (type.startsWith("item:") && toSpawn == EntityType.DROPPED_ITEM){
View Full Code Here


            creep.setPowered(true);
          } else if (type.equalsIgnoreCase("saddle")){
            Pig pig = (Pig) entity1;
            pig.setSaddle(true);
          } else if (toSpawn == EntityType.ENDERMAN && ClosestMatches.material(type).size() > 0){
            Enderman enderman = (Enderman) entity1;
            enderman.setCarriedMaterial(new MaterialData(ClosestMatches.material(type).get(0)));
          } else if (toSpawn == EntityType.VILLAGER && ClosestMatches.villagerProfessions(type).size() > 0){
            Villager villager = (Villager) entity1;
            villager.setProfession(ClosestMatches.villagerProfessions(type).get(0));
          } else if (type.startsWith("item:") && toSpawn == EntityType.DROPPED_ITEM){
View Full Code Here

      if (block.getType() == Material.WALL_SIGN || block.getType() == Material.SIGN_POST)
        DataManager.addEntry(new SignEntry("Environment", DataType.SIGN_BREAK, event.getBlock()));
      DataManager.addEntry(new BlockEntry("Environment", DataType.ENDERMAN_PICKUP, block));
    } else if (Config.isLogged(DataType.ENDERMAN_PLACE)) {
      // Enderman placing block
      Enderman enderman = (Enderman) event.getEntity();
      BlockState newState = block.getState();
      if (enderman.getCarriedMaterial() != null) {
        try {
          newState.setData(enderman.getCarriedMaterial());
        } catch (Exception e) { }
        newState.setType(enderman.getCarriedMaterial().getItemType());
      }

      DataManager.addEntry(new BlockChangeEntry("Environment", DataType.ENDERMAN_PLACE, block.getLocation(), block.getState(), newState));
    }
  }
View Full Code Here

TOP

Related Classes of org.bukkit.entity.Enderman

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.