mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
Location.getBlock() helper method
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
636c1ec83a
commit
9adb4e4d92
1 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
package org.bukkit;
|
package org.bukkit;
|
||||||
|
|
||||||
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,6 +46,15 @@ public class Location implements Cloneable {
|
||||||
return world;
|
return world;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Sets the x-coordinate of this location
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue