Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Javascript to bukkit plugin

This plugin allows you to execute javascript files in bukkit plugins.
Drop you .js files to plugin folder.

This is just a prototype, the code is far from perfect.

Example plugin

Example code

(function() {
    const plugin = require('plugin');

    plugin.onEvent("PlayerJoinEvent", function(event) {
        const player = event.getPlayer();
        player.sendMessage("Welcome to server!");
        player.teleport(player.getLocation().add(0, 5, 0));
    });

    plugin.onCommand("testjs", function(cmd) {
        cmd.sender.sendMessage("JS command works!");
        return true;
    });

    function onEnable() {
        plugin.logger.info("Script enabled");
    }

    function onDisable() {
        plugin.logger.info("Script disabled");
    }
})();

About

Use javascript and typescript to minecraft bukkit plugins

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages