The NINJASCRIPT VanillaGuard Server Wrapper is a system of automated scripts written in the Bash scripting language designed to help maintain a pure vanilla minecraft server, or to perform some essential functions of Bukkit where it can't be used for some reason, ex. on a ModLoader server.
NINJASCRIPT is far and away the most sophisticated server wrapper system publicly available as of this writing. In addition to the standard features a wrapper should perform (backups, welcome messages, restarts after crashes), NINJASCRIPT adds MASSIVE amounts of administrative help ingame. Here is the complete list of features, all of which can be enabled/disabled in a config file:
Catching alts of banned players by automatically tracking ip addresses
Automatic updates of itself and of Minecraft
Non-OP Moderators with less privileges than ops
View players' inventories in game by temporarily "cloning" them
Clear a player's inventory in game by deleting their .dat file
Spam protection
Hacking protection, which currently stops sneak, most speedhax, and notifies ops of any other suspicious motion-related activity
Scheduled backups of the server world
Scheduled server wide Message Of The Day
Custom welcome message
Reserved slots (on no-whitelist servers)
Scheduled restarting of the server, to prevent lag issues and some Minecraft/Java bugs
Restoring of the Spawn (or any) region regularly from a read-only backup
Resetting of The End, to allow multiple players to slay the Enderdragon
Custom server invocation, allowing advanced Java options
Split/catalog the server.log file for easier browsing and searching
Check server CPU usage, as well as ram and disk in game
"Admin chat channel" that only ops can see
Many helpful administrative commands, listed below
In addition to its many passive functions, NINJASCRIPT also adds several commands to the game, allowing your ops to do things that normally require digging around in SSH or would usually need mods. Here is the full list of added commands, and what they do:
NINJASCRIPT Commands
/status
Prints the CPU, RAM, and DISK usage of the server, useful for diagnosing lag issues. If the RAM usage is consistently high, consider adjusting the -Xmx option in the invocation.
/lagfix
A useful command that restarts the spamkiller.sh and commands.sh scripts, as well as clearing the server's memory cache. Use this command if /status reports high RAM usage. It is automatically run after world backups, because of the heavy load it puts on RAM.
/tempban <name> <value><s|m|h|d>
Provides a temporary ban of a time you specify. <value> does not need to be an integer, for example "/tempban bob 1.5h" will ban "bob" for 1.5 hours
/banhammer <name>
Bans <name> normally, but checks the server.log file for their IP, and bans that too. Highly useful for banning griefers with multiple accounts. Also prints "name was BANHAMMERED" in the chat. IP's banned this way are reset during the scheduled server restarts, for obvious reasons. If the reason isn't obvious to you, google "dynamic ip."
/backspawn
Backs up the region defined by SpawnRegionFile= for later use with /restspawn, and the automatic spawn restore during scheduled restarts (if enabled)
/restspawn
Restores the spawn from the backup created by /backspawn. NOTE THAT THIS COMMAND ALSO RESTARTS THE SERVER./cleanup
Deletes world backups older than 24 hours. This is useful if /status reports a full disk. It can take quite a long time to complete, depending on how many backups it has to delete, and I suggest running /lagfix when it finishes. (This command is mostly deprecated, since the automatic backup function only keeps backups for about 6 days)
/bantrap <name>
Bans <name> but with a kick. Instead of a simple ip-ban, the bantrap takes a more active approach to catching hackers. When you bantrap someone, a "trap" is laid for that person's ip. If they try to log into the server with another account it waits for about 20 seconds, and then bans them automatically. You may see anywhere between 5 and 30 accounts in a row nailed by a single trap. Like ip-bans, bantraps are reset with the spawn.
/cleartraps
Clears all traps laid by /bantrap, in case you need to pardon someone you previously bantrapped (so they don't get automatically banned again)(Semi-deprecated. use /unban <name> instead, unless for some reason you actually need to clear ALL bantraps.).
/unban <name>
Pardons name but also removes them from the bantrap, so they will not be automatically banned again. Generally use this instead of /pardon
/tpr
Teleports you to a player at random. Do not spam this command though, since each teleport causes some load on the server.
/ops <message>
Prints <message> to all opped players. "The admin channel"
/whois <name>|<ip>
Takes a name or ip address and outputs the other. Useful if you suspect someone logging multiple accounts without getting caught. Also displays whether a player is admin, premium (meaning they have a reserved slot), moderator, or banned.
/purge <name>
Deletes <name>'s dat file (their inventory and location) and kicks them to save the changes. Also works on offline players
/clone <name>
Copies a player's dat file over your own, so you 'clone' that player. Kicks both of you in the process. Works on any player who has ever logged into the server, even if they are not online. This is useful for teleporting players to the locations of offline teammates also, since you can clone the teammate and tp the person to yourself.
/restore <name>
Restores a dat file deleted/overwritten by /purge or /clone. Use this to get your inventory back after using /clone.
/mods add|remove|list [name]
Adds/removes [name] from the moderators list, or lists all current moderators. Mods have access only to the following commands: /h, /kick, /ban, /pardon. Note that a mod's /h text is different from the admin /h.
/h [command]
Lists all available NINJASCRIPT commands, or gives details about a single command if one is provided.
DOWNLOAD: You can download the install script for NINJASCRIPT VanillaGuard from http://www.gffserver.com/downloads, and if you like it please donate on that page .
INSTALL: All you need to do to install NINJASCRIPT is copy the setup.sh file you downloaded into the folder your server runs from, log into your server's SSH using PuTTY or similar and run it using
bash setup.sh
Once setup.sh finishes, check out the ninjascript.conf file it created and adjust any options you want to your liking. From here you can choose which features to use, and the times for the scheduled activities like backups, etc. If you plan to use /backspawn, you will need to look up which region file contains your spawn area and enter the name of it in here also.
To actually start the server, first make sure your server is stopped, and if you use MCMA you will need to shut down your server there, and make sure it doesn't try to restart it. then run
bash launch.sh start
and NINJASCRIPT will start your server with the settings provided in server.properties and ninjascript.conf. Once you do this you probably won't need to do really anything with PuTTY except maybe changing settings in ninjascript.conf
If you need any help, encounter any bugs, or have suggestions on what I should add just post here or you can email me directly. Currently in development are packet based block logging and a web admin tool.
This only works on linux, sorry. Ubuntu or CentOS are the most common... It is possible though to install a linux distro on your windows computer and do it that way. Ubuntu i know comes with a windows installer called 'Wubi' so you can use it without having to restart your computer.
NINJASCRIPT VanillaGuard Version 2.7.0
©2012 Christian "rocketman679" Haataja
[email protected]
www.gffserver.com/forum
===========================================================
The NINJASCRIPT VanillaGuard Server Wrapper is a system of automated scripts written in the Bash scripting language designed to help maintain a pure vanilla minecraft server, or to perform some essential functions of Bukkit where it can't be used for some reason, ex. on a ModLoader server.
NINJASCRIPT is far and away the most sophisticated server wrapper system publicly available as of this writing. In addition to the standard features a wrapper should perform (backups, welcome messages, restarts after crashes), NINJASCRIPT adds MASSIVE amounts of administrative help ingame. Here is the complete list of features, all of which can be enabled/disabled in a config file:
NINJASCRIPT Commands
Prints the CPU, RAM, and DISK usage of the server, useful for diagnosing lag issues. If the RAM usage is consistently high, consider adjusting the -Xmx option in the invocation.
/lagfix
A useful command that restarts the spamkiller.sh and commands.sh scripts, as well as clearing the server's memory cache. Use this command if /status reports high RAM usage. It is automatically run after world backups, because of the heavy load it puts on RAM.
/tempban <name> <value><s|m|h|d>
Provides a temporary ban of a time you specify. <value> does not need to be an integer, for example "/tempban bob 1.5h" will ban "bob" for 1.5 hours
/banhammer <name>
Bans <name> normally, but checks the server.log file for their IP, and bans that too. Highly useful for banning griefers with multiple accounts. Also prints "name was BANHAMMERED" in the chat. IP's banned this way are reset during the scheduled server restarts, for obvious reasons. If the reason isn't obvious to you, google "dynamic ip."
/backspawn
Backs up the region defined by SpawnRegionFile= for later use with /restspawn, and the automatic spawn restore during scheduled restarts (if enabled)
/restspawn
Restores the spawn from the backup created by /backspawn. NOTE THAT THIS COMMAND ALSO RESTARTS THE SERVER./cleanup
Deletes world backups older than 24 hours. This is useful if /status reports a full disk. It can take quite a long time to complete, depending on how many backups it has to delete, and I suggest running /lagfix when it finishes. (This command is mostly deprecated, since the automatic backup function only keeps backups for about 6 days)
/bantrap <name>
Bans <name> but with a kick. Instead of a simple ip-ban, the bantrap takes a more active approach to catching hackers. When you bantrap someone, a "trap" is laid for that person's ip. If they try to log into the server with another account it waits for about 20 seconds, and then bans them automatically. You may see anywhere between 5 and 30 accounts in a row nailed by a single trap. Like ip-bans, bantraps are reset with the spawn.
/cleartraps
Clears all traps laid by /bantrap, in case you need to pardon someone you previously bantrapped (so they don't get automatically banned again)(Semi-deprecated. use /unban <name> instead, unless for some reason you actually need to clear ALL bantraps.).
/unban <name>
Pardons name but also removes them from the bantrap, so they will not be automatically banned again. Generally use this instead of /pardon
/tpr
Teleports you to a player at random. Do not spam this command though, since each teleport causes some load on the server.
/ops <message>
Prints <message> to all opped players. "The admin channel"
/whois <name>|<ip>
Takes a name or ip address and outputs the other. Useful if you suspect someone logging multiple accounts without getting caught. Also displays whether a player is admin, premium (meaning they have a reserved slot), moderator, or banned.
/purge <name>
Deletes <name>'s dat file (their inventory and location) and kicks them to save the changes. Also works on offline players
/clone <name>
Copies a player's dat file over your own, so you 'clone' that player. Kicks both of you in the process. Works on any player who has ever logged into the server, even if they are not online. This is useful for teleporting players to the locations of offline teammates also, since you can clone the teammate and tp the person to yourself.
/restore <name>
Restores a dat file deleted/overwritten by /purge or /clone. Use this to get your inventory back after using /clone.
/mods add|remove|list [name]
Adds/removes [name] from the moderators list, or lists all current moderators. Mods have access only to the following commands: /h, /kick, /ban, /pardon. Note that a mod's /h text is different from the admin /h.
/h [command]
Lists all available NINJASCRIPT commands, or gives details about a single command if one is provided.
DOWNLOAD:
You can download the install script for NINJASCRIPT VanillaGuard from http://www.gffserver.com/downloads, and if you like it please donate on that page .
INSTALL:
All you need to do to install NINJASCRIPT is copy the setup.sh file you downloaded into the folder your server runs from, log into your server's SSH using PuTTY or similar and run it using
Once setup.sh finishes, check out the ninjascript.conf file it created and adjust any options you want to your liking. From here you can choose which features to use, and the times for the scheduled activities like backups, etc. If you plan to use /backspawn, you will need to look up which region file contains your spawn area and enter the name of it in here also.
To actually start the server, first make sure your server is stopped, and if you use MCMA you will need to shut down your server there, and make sure it doesn't try to restart it. then run
and NINJASCRIPT will start your server with the settings provided in server.properties and ninjascript.conf. Once you do this you probably won't need to do really anything with PuTTY except maybe changing settings in ninjascript.conf
If you need any help, encounter any bugs, or have suggestions on what I should add just post here or you can email me directly. Currently in development are packet based block logging and a web admin tool.