Package org.bukkit.entity

Examples of org.bukkit.entity.Hanging


        Entity ent = event.getRightClicked();
        Material heldItem = player.getItemInHand().getType();
        if (!(ent instanceof Hanging)) {
            return;
        }
        Hanging hanging = (Hanging) ent;
        if (hanging.getType() != EntityType.ITEM_FRAME) {
            return;
        }
        FlagPermissions perms = Residence.getPermsByLocForPlayer(ent.getLocation(), player);
        String world = player.getWorld().getName();
        String permgroup = Residence.getPermissionManager().getGroupNameByPlayer(player);
View Full Code Here


     *            The HangingBreakEvent.
     */
    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    public void onHangingBreak(HangingBreakEvent event)
    {
        Hanging h = event.getEntity();
        WorldConfig world = CreeperConfig.getWorld(h.getWorld());
        switch (event.getCause())
        {
        case EXPLOSION:
            ExplodedBlockManager.recordHanging(h);
            break;
        case PHYSICS:
        case OBSTRUCTION:
            if (BurntBlockManager.isNextToFire(h.getLocation()) && world.getBool(WCfgVal.FIRE))
                BurntBlockManager.recordBurntBlock(new CreeperBurntBlock(new Date(), CreeperHanging.newHanging(h)));
            break;
        default:
        }

View Full Code Here

 
  @EventHandler (priority = EventPriority.NORMAL)
  public void onHangingPlaced (HangingPlaceEvent event) {

    // BlockState
    Hanging  hanging = event.getEntity();
   
    // ItemFrame?
    if (hanging instanceof ItemFrame) {
      scs.getShopHandler().addItemFrame((ItemFrame)hanging);
    }
View Full Code Here

 
  @EventHandler (priority = EventPriority.NORMAL)
  public void onHangingBreaked (HangingBreakEvent event) {

    // BlockState
    Hanging  hanging = event.getEntity();
   
    // ItemFrame?
    if (hanging instanceof ItemFrame) {
      scs.getShopHandler().removeItemFrame((ItemFrame)hanging);
    }
View Full Code Here

TOP

Related Classes of org.bukkit.entity.Hanging

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.