Package org.bukkit.entity

Examples of org.bukkit.entity.ItemFrame


    @Override
    public boolean replace(boolean shouldDrop)
    {
        try
        {
            ItemFrame f = getWorld().spawn(location.getBlock().getRelative(hanging.getAttachedFace()).getLocation(), ItemFrame.class);
            f.teleport(location);
            f.setItem(((ItemFrame) hanging).getItem());
            f.setRotation(((ItemFrame) hanging).getRotation());
            f.setFacingDirection(hanging.getFacing(), true);
        } catch (IllegalArgumentException e)
        {
            return false;
        }
View Full Code Here


    @Override
    public boolean drop(boolean forced)
    {
        if (forced || new Random().nextInt(100) < CreeperConfig.getInt(CfgVal.DROP_CHANCE))
        {
            ItemFrame f = (ItemFrame) hanging;
            ItemStack s = f.getItem();
            if (s.getType() != Material.AIR)
                getWorld().dropItemNaturally(getLocation(), s);
            getWorld().dropItemNaturally(getLocation(), new ItemStack(389, 1));
            return true;
        }
View Full Code Here

TOP

Related Classes of org.bukkit.entity.ItemFrame

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.