Added more API and features for Events

This commit is contained in:
Sn0wStorm
2019-11-13 22:07:22 +01:00
parent 48a15a0e82
commit 3332354846
29 changed files with 672 additions and 224 deletions
+4 -1
View File
@@ -34,7 +34,7 @@ public class BarrelBody {
// This will only be done in those extreme cases.
Block broken = getBrokenBlock(true);
if (broken != null) {
barrel.remove(broken, null);
barrel.remove(broken, null, true);
}
} else {
this.bounds = bounds;
@@ -150,6 +150,9 @@ public class BarrelBody {
*/
public boolean hasBlock(Block block) {
if (block != null) {
if (spigot.equals(block)) {
return true;
}
if (spigot.getWorld().equals(block.getWorld())) {
return bounds != null && bounds.contains(block.getX(), block.getY(), block.getZ());
}