Add Cause.getFirstBlock().

This commit is contained in:
sk89q 2014-08-18 23:31:19 -07:00
parent 2c81cb2f84
commit 53957e7b26

View File

@ -103,6 +103,17 @@ public Entity getFirstEntity() {
return null;
}
@Nullable
public Block getFirstBlock() {
for (Object object : causes) {
if (object instanceof Block) {
return (Block) object;
}
}
return null;
}
@Override
public String toString() {
return Joiner.on(" | ").join(causes);