Skip to content

Instantly share code, notes, and snippets.

@walterhiggins
Created January 31, 2015 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walterhiggins/67b64677e2c7a50a652d to your computer and use it in GitHub Desktop.
Save walterhiggins/67b64677e2c7a50a652d to your computer and use it in GitHub Desktop.
Initialization file for use in modding workshop on student servers
'use strict';
/*global require, events, server, Packages*/
var slash = require('slash');
slash([
'groupmod permission add visitors canary.world.build',
'groupmod permission add visitors scriptcraft.evaluate'
],server);
/*
WARNING: The following code makes all players ops.
Only use this for local servers .
*/
function makePlayerOp(event){
console.log(event.player + ' connected');
var Canary = Packages.net.canarymod.Canary;
Canary.ops().addPlayer(event.player.name);
}
events.connection(makePlayerOp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment