public class WorldUtils
extends java.lang.Object
| Constructor and Description |
|---|
WorldUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
doesSpecifiedBlockExists(Location location,
java.lang.Class blockClass)
Checks if the provided block type exists in the specified location
|
static net.minecraft.entity.Entity |
getNearestEntityToLocation(Location location)
Gets the nearest entity within the recommended max range of a location
|
static net.minecraft.entity.Entity |
getNearestEntityToLocation(Location location,
double maxRange)
Gets the nearest entity within a range of a location
|
static net.minecraft.entity.player.EntityPlayer |
getPlayerForWorld(java.lang.String playerName,
net.minecraft.world.World world)
Gets a player with the given username in the provided world
|
static net.minecraft.world.World |
getWorldFromDimensionId(int id)
Gets the world for the provided dimension id
|
static net.minecraft.entity.item.EntityItem |
spawnItemInWorld(Location location,
net.minecraft.item.ItemStack stack)
Spawns an item in the world at the specified location
|
public static net.minecraft.entity.player.EntityPlayer getPlayerForWorld(java.lang.String playerName,
net.minecraft.world.World world)
playerName - The player usernameworld - The worldpublic static net.minecraft.world.World getWorldFromDimensionId(int id)
id - The dimension idpublic static net.minecraft.entity.Entity getNearestEntityToLocation(Location location, double maxRange)
location - The location to search frommaxRange - The max range to find entities frompublic static net.minecraft.entity.Entity getNearestEntityToLocation(Location location)
location - The location to search frompublic static net.minecraft.entity.item.EntityItem spawnItemInWorld(Location location, net.minecraft.item.ItemStack stack)
location - The location for the item to be spawnedstack - The item to spawnpublic static boolean doesSpecifiedBlockExists(Location location, java.lang.Class blockClass)
location - The location to checkblockClass - The class of the block to look for