This will hopefully prevent any more mistakes related to checking if something is a sign or not.
26 lines
494 B
Java
26 lines
494 B
Java
package net.knarcraft.paidsigns.utility;
|
|
|
|
import org.bukkit.block.Block;
|
|
import org.bukkit.block.Sign;
|
|
|
|
/**
|
|
* A helper class for dealing with signs
|
|
*/
|
|
public final class SignHelper {
|
|
|
|
private SignHelper() {
|
|
|
|
}
|
|
|
|
/**
|
|
* Checks whether the given block is a sign
|
|
*
|
|
* @param block <p>The block to check</p>
|
|
* @return <p>True if the block is a sign</p>
|
|
*/
|
|
public static boolean isSign(Block block) {
|
|
return block.getState() instanceof Sign;
|
|
}
|
|
|
|
}
|