mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
Add Cause.getFirstBlock().
This commit is contained in:
parent
2c81cb2f84
commit
53957e7b26
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user