earthmc
v8.3.4
Published
An unofficial EarthMC library providing handy methods and extensive info.
Downloads
588
Maintainers
Readme
EarthMC-NPM
An unofficial wrapper library for interacting with the EarthMC Dynmap API. This package is part of the EarthMC Toolkit and provides extensive info on people, places and more.
Install
pnpm add earthmc
Basic Usage
View the full documentation here.
Node
import { Aurora } from 'earthmc' // ESM
const { Aurora } = require('earthmc') // CJS
const towns = await Aurora.Towns.all().catch(console.error)
console.log(towns.length)
Browser
<button onclick="townAmount()">Show town amount</button>
<script type="module" src="https://unpkg.com/earthmc@latest/dist/main.js"></script>
<script>
import { Aurora } from 'earthmc'
window.townAmount = async function() {
try {
const towns = await Aurora.Towns.all()
alert(towns.length)
}
catch(e) {
console.error(e)
}
}
</script>