JSC

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

JSC Banner

JSC is a simplicity-oriented, feature-rich rewrite of the excellent ScriptCraft by Walter Higgins.

JSC lets you write Bukkit plugins in Javascript. It has many advantages over traditional Java plugins, inlcuding:

  • On-the-fly code editing
  • No need to compile the plugins
  • No need to learn/understand Java's complex object-oriented programming
  • Insanely simple integration of plugins/modules: JSC uses Node.js's require() function, which allows you to access other plugins' variables/functions with ease.

It comes with helper functions/variables/modifications (e.g. event handling, global command registering), so you can painlessly write Bukkit plugins!

Commands

  • /js Evaluates Javascript. Permission - jsc.evaluate Example - /js server.broadcastMessage("Hi");

  • /jsp Executes registered 'jsp' commands, including JSC's own commands (e.g. 'update', 'cancel'). Permission - jsc.proxy Example - /jsp update core

  • /jsc Displays plugin version. Permission - none Example - /jsc

How to use

First, install the plugin, and then in chat, type:

/js 5+5;

This is the most simple form of JS -- arithmetic. Now, it doesn't stop there, you can do a lot of things with it!

Take a look at the next example:

/js events.on("player.PlayerChatEvent", function(listener, event){event.setMessage(String(event.getMessage()).green())});

This registers a Bukkit PlayerChatEvent so when a player says something, it makes their text green!

Note how event.setMessage() and event.getMessage() are used. These are actual Bukkit API methods!

Writing plugins has never been as painless as this.

Writing modules/plugins

To get started, read the wiki (a work in progress). All the documentation and tutorials can be found there.

If you want inspiration, dig inside these plugins and these modules. You can run plugins/modules by putting them in the plugins/jsc/(plugins/modules) folder.

Metrics

This plugin uses Hidendra's Metrics system, which collects and reports various data to mcstats.org, which can include:

  • A unique identifier
  • The server's version of Java
  • Whether the server is in offline or online mode
  • The plugin's version
  • The server's version
  • The OS version/name and architecture
  • The core count for the CPU
  • The number of players online
  • The Metrics version

You can always opt-out by going in plugins/PluginMetrics/config.yml and changing the opt-out option to true

Source

Feel free to fork this project on GitHub!


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    73362
  • Created
    Jan 27, 2014
  • Last Released File
    Apr 20, 2014
  • Total Downloads
    250
  • License

Categories

Members

Recent Files