diff --git a/src/main/java/com/sk89q/worldguard/bukkit/cause/Cause.java b/src/main/java/com/sk89q/worldguard/bukkit/cause/Cause.java index d5bf8dcf..15cb9c60 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/cause/Cause.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/cause/Cause.java @@ -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);