Package org.getspout.spoutapi.material

Examples of org.getspout.spoutapi.material.CustomBlock.onBlockDestroyed()


    SpoutPlayer player = (SpoutPlayer) event.getPlayer();

    if (block.getCustomBlock() != null) {
      CustomBlock material = block.getCustomBlock();
      material.onBlockDestroyed(block.getWorld(), block.getX(), block.getY(), block.getZ(), player);
      if (material.getItemDrop() != null) {
        if (player.getGameMode() == GameMode.SURVIVAL) {
          block.getWorld().dropItem(block.getLocation(), material.getItemDrop());
        }
        block.setTypeId(0);
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.