ChestShop-3/com/Acrobot/Breeze/Utils/BlockUtil.java
Acrobot d1732552b0 - Made the plugin more event-driven
- Added PreTransactionEvent which can be cancelled
- Fixed not placing B/S before prices
- Updated Heroes
2012-07-07 19:24:06 +02:00

31 lines
746 B
Java

package com.Acrobot.Breeze.Utils;
import org.bukkit.block.Block;
import org.bukkit.block.Sign;
import org.bukkit.material.Attachable;
/**
* @author Acrobot
*/
public class BlockUtil {
/**
* Checks if the block is a sign
*
* @param block Block to check
* @return Is this block a sign?
*/
public static boolean isSign(Block block) {
return block.getState() instanceof Sign;
}
/**
* Gets the block to which the sign is attached
*
* @param sign Sign which is attached
* @return Block to which the sign is attached
*/
public static Block getAttachedFace(Sign sign) {
return sign.getBlock().getRelative(((Attachable) sign.getData()).getAttachedFace());
}
}