diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-18 16:28:42 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-18 16:28:42 +0000 |
commit | 1e94bb16f5104b3a3c7fab5b83b98e3e248b7fe9 (patch) | |
tree | d8473fb16db2356c6533a647d272aeb4e3ba17a4 /src | |
parent | 2188275a0084f5b819dc9355d2e5233ea5e8e297 (diff) | |
download | bukkit-1e94bb16f5104b3a3c7fab5b83b98e3e248b7fe9.tar bukkit-1e94bb16f5104b3a3c7fab5b83b98e3e248b7fe9.tar.gz bukkit-1e94bb16f5104b3a3c7fab5b83b98e3e248b7fe9.tar.lz bukkit-1e94bb16f5104b3a3c7fab5b83b98e3e248b7fe9.tar.xz bukkit-1e94bb16f5104b3a3c7fab5b83b98e3e248b7fe9.zip |
Location.getBlock() helper method
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/Location.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java index 7316ea33..85f2c714 100644 --- a/src/main/java/org/bukkit/Location.java +++ b/src/main/java/org/bukkit/Location.java @@ -1,6 +1,7 @@ package org.bukkit; +import org.bukkit.block.Block; import org.bukkit.util.Vector; /** @@ -46,6 +47,15 @@ public class Location implements Cloneable { } /** + * Gets the block at the represented location + * + * @return Block at the represented location + */ + public Block getBlock() { + return world.getBlockAt(getBlockX(), getBlockY(), getBlockZ()); + } + + /** * Sets the x-coordinate of this location * * @param x X-coordinate |