Fixed NullPointerException in WorldGuardListener.onSignChange().

This commit is contained in:
sk89q 2010-12-26 10:31:54 -08:00
parent 7c0e10d058
commit b496e88557

View File

@ -756,13 +756,15 @@ public boolean onOpenInventory(Player player, Inventory inventory) {
* @return true if you wish to cancel this change
*/
public boolean onSignChange(Player player, Sign sign) {
int id = etc.getServer().getBlockIdAt(sign.getX(),
sign.getY(), sign.getZ());
Block block = new Block(id, sign.getX(),
sign.getY(), sign.getZ());
if (blacklist != null) {
int id = etc.getServer().getBlockIdAt(sign.getX(),
sign.getY(), sign.getZ());
Block block = new Block(id, sign.getX(),
sign.getY(), sign.getZ());
if (!blacklist.onSilentUse(block, player)) {
return true;
if (!blacklist.onSilentUse(block, player)) {
return true;
}
}
return false;