1.0 KiB
IScriptServer.isOnline
isOnline(java.lang.String username)
default boolean Check if a player is online.
Method Detail getMinecraftServer
MinecraftServer getMinecraftServer()
Get Minecraft server instance. BEWARE: you need to know the MCP mappings in order to directly call methods on this instance!
getWorld
IScriptWorld getWorld(int dimension)
Get world at dimension ID.
var overworld = c.getServer().getWorld(0);
// Do something with the world...
getEntities
java.util.List getEntities(java.lang.String targetSelector)
Get all entities matching giving target selector.
var cows = c.getServer().getEntities("@e[type=minecraft:cow]");
// Despawn all cows for (var i in cows) { cows[i].remove(); }
getEntity
IScriptEntity getEntity(java.lang.String uuid)
Get an entity by its UUID.
var uuid = "29a91933-86f2-4683-8a87-218084d8c927"; var entity = c.getServer().getEntity(uuid);