npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@magikcraft/regenerate-spawn

v0.0.4

Published

This is a Minecraft plugin written for the Scriptcraft Modular Architecture. It will periodically regenerate the spawn point in the main world on a server.

Downloads

7

Readme

@magikcraft/regenerate-spawn

This is a Minecraft plugin written for the Scriptcraft Modular Architecture. It will periodically regenerate the spawn point in the main world on a server.

To install

npm i @magikcraft/regenerate-spawn

Building

  • Install the TypeScript compiler:
npm i -g typescript
  • Start the TypeScript compiler:
tsc

To start the compiler in watch mode (recompile on file save):

tsc -w

Running a development server

You can start a development server and test your code using smac - the Scriptcraft Modular Architecture.

  • Make sure you have Docker installed on your computer.
  • Install smac globally:
npm i -g smac

Your plugin contains server profiles for both a Bukkit server (supports the Java Minecraft client) and a Nukkit server (supports Minecraft Pocket Edition).

Start a Bukkit Server

  • To start a Bukkit development server:
smac start

This uses the profile in smac.json.

Start a Nukkit Server

  • To start a Nukkit development server:
smac start -f smac-nukkit.json

This uses the profile in smac-nukkit.json

Reloading your code

As you change your code, you can reload the changes in the running server by typing in the server console:

ts refresh()

To switch on TypeScript mode, type in the server console:

ts on

This allows you to execute TypeScript code directly in the server console. Now you need only type refresh() to refresh your code in the server.

To turn off TypeScript mode, type:

ts off

Running Unit Tests

SMA Plugins provide unit testing using Jasmine.

To run unit tests for your plugins, write them in __tests__ and compile them.

Then run smac in test mode:

smac start -t

This will start the container in test mode. Code will not be autoloaded, and the unit tests will be run.

To have the container exit after the tests have run, start it with the -e flag.

# Run tests and exit
smac start -t -e

The process will exit with exit code 0 if all tests pass, and exit code 1 if any of the test fail.