Package org.bukkit.block

Examples of org.bukkit.block.Skull.update()


        // -->
        if (mechanism.matches("skull_skin") && getBlock().getState() instanceof Skull) {
            Skull state = ((Skull)getBlock().getState());
            if (!state.setOwner(value.asString()))
                dB.echoError("Failed to set skull_skin!");
            state.update(true);
        }

        if (!mechanism.fulfilled())
            mechanism.reportInvalid();
    }
View Full Code Here


            if(showNameClick && MobSkullType.getEntityType(skull.getOwner()) == null) {
                player.printRaw(ChatColor.YELLOW + player.translate("mech.headdrops.click-message") + " " + skull.getOwner());
            } else if (MobSkullType.getEntityType(skull.getOwner()) != null) {
                skull.setOwner(MobSkullType.getFromEntityType(MobSkullType.getEntityType(skull.getOwner())).getPlayerName());
                skull.update();
            }
        }
    }

    @EventHandler(priority = EventPriority.HIGH)
View Full Code Here

        Skull newSkull = ((Skull) blockState.getBlock().getState());
        newSkull.setRotation(skull.getRotation());
        newSkull.setSkullType(skull.getSkullType());
        if (skull.hasOwner())
            newSkull.setOwner(skull.getOwner());
        newSkull.update(true);
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.