Created
January 31, 2015 17:28
-
-
Save walterhiggins/67b64677e2c7a50a652d to your computer and use it in GitHub Desktop.
Initialization file for use in modding workshop on student servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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