I'm trying to teach students how to program JavaScript inside Minecraft with ScriptCraft. It's been amazing, except for the fact that even my most focused students get so distracted with playing minecraft instead of learning to program. I need a way for them to essentially not be able to do anything in Minecraft if it wasn't done programmatically through JavaScript.

ScriptCraft requires running a CraftBukkit server. Is there a mechanism to do disallow mining or building in Minecraft, CraftBukkit or a CraftBukkit plugin?

  • 1
    Does /gamemode 2 not solve the problem? Don't give them a tool, and they can't get most blocks. If they don't have blocks, it's hard for them to build anything.
    – MBraedley
    Commented Jan 31, 2013 at 12:21
  • For reference, gamemmode 2 is Adenture mode, where you cannot harvest any block without the matching tool (shovels for dirt, axes for wood, etc).
    – Wikwocket
    Commented Jan 31, 2013 at 14:18
  • /gamemode 2 doesn't solve the problem, but it does sound better than modes 0 or 1. The issue is distraction and there's still some distraction in Adventure mode. ScriptCraft also requires users have op privileges. So very easy for users to change their gamemode. I'm not too worried about that as this can be a more serious violation of our rules.
    – at01
    Commented Jan 31, 2013 at 16:57
  • 1
    I would add another upvote to both the question and answer if I could. Glad you found a solution!
    – MBraedley
    Commented Feb 2, 2013 at 20:00

2 Answers 2


PermissionsEx and ModifyWorld should solve this problem quite nicely.

PermissionsEx is a general permissions plugin and ModifyWorld is an optional part of PEX:

[ModifyWorld] provides the possibility to control players abilities, such as destroying/placing blocks, riding carts/boats or even getting spotted by mobs and much more. Disabled by default.

The PEX wiki has a nice series of articles explaining exactly how to setup PEX with modofyworld. I suggest you follow along the tutorial so you understand how to install and configure PEX. Then when you get to the "Basic-Permissions-Setup" page, use my suggested configuration instead of theirs.


    backends:                            <- Backend Definition Section
        file:                            <- File Based Backend Section
            file: permissions.yml        <- File Name To Use
    backend: file                        <- Backend To Use On Start
    superperms:                          <- Settings For SuperPerm Support
        enable-wildcards: true
        disable-unmatched: false
        enable: true
        debug: false
        compatibility-mode: false
    createUserRecords: false             <- Other Settings
    allowOps: false
    debug: false
    basedir: plugins/PermissionsEx       <- Directory Name To Use

Once this is done, it sounds like this ought to work as your permissions.yml:

    #default group
        default: true
        prefix: '&0(&4Default&0)&7 '
        - -modifyworld.*    #All permissions, equivalent to current setup

        default: false
        - modifyworld.chat
        - modifyworld.sneak
        - modifyworld.sprint
        - modifyworld.blocks.interact.69    #Allow levers
        - -modifyworld.*

        default: false
        - modifyworld.*
        - permissions.*

        - students
        - students
        - students
        - Teacher

This puts the listed students into the students group, which denies all permissions except those specifically listed. You may want to browse the block ID list and allow modifyworld.blocks.interact.<Block ID> with some more of them (e.g. chests, buttons, doors). Make sure to use the "Dec" value listed, not the "Hex". You may also want to browse the permissions list to check for other things you want to allow students to do.

If you miss any student names they will be allowed to do everything, which is equivalent to the permissions they have right now. If any students are in this group when they chat their name will be prefixed by "default" in coloured letters, which will alert you to fix this error. You can fix this by typing in game using your op account:

/pex user <username> group add students

Note: I specifically did not make the default group the limited one for students. PEX often messes up plugins by trying to apply permissions to the actions of the plugins (so in this case ScriptCraft might have the same limitations as the students). I have no idea if this is a problem for ScriptCraft, you could test it by moving all the student permissions to default and seeing if ScriptCraft still works.

In Response To Comment: I've modified the config to account for all students needing to be op. By using allowOps: false this tells PEX that it should apply permissions rules even to ops. With this setting on you will probably need to allow access to all of the ScriptCraft commands, simply add the relevant permission nodes to the relevant groups.

  • ScriptCraft requires students to be ops. I know that may allow them to circumvent any permissions settings, but that's ok. Purposely circumventing our permissions would be a serious violation and we can make that clear. However, would this work with PermissionsEx and ModifyWorld? You mentioned making yourself an op "ensures that you will retain all permissions no matter what you configure PEX to do"
    – at01
    Commented Jan 31, 2013 at 17:01
  • I'll update my answer
    – Martin
    Commented Jan 31, 2013 at 17:26
  • Excellent, I'll try this out shortly!
    – at01
    Commented Jan 31, 2013 at 19:16
  • Nothing really works here. I installed the PermissionsEx plugin, which comes with the ModifyWorld plugin. I copied your config.yml and permissions.yml text above. I get an error when booting the server that there are no groups defined, so I simply add a groups: line at the top of permissions.yml. That solves it. Looks like it loads everything fine. But it has zero effect. I can make myself not an op. The prefix doesn't show up whether I am or am not a student.. (should the group be student or students? I tried both).
    – at01
    Commented Feb 1, 2013 at 17:27
  • Ok, I kind of got this to work. First, not even ops can do the /pex command. That seems to have to be run on the server itself. But then I was able to add myself to the student group (adding myself to a group within the permissions.yml file doesn't work) and now I can't destroy anything. The colored chat prefix doesn't show up at all for default or student grouped users.
    – at01
    Commented Feb 1, 2013 at 17:37

@at01 > ScriptCraft requires students to be ops. I know that may allow them to circumvent any permissions settings,

There's a new version of scriptcraft with a new classroom module which lets tutors turn on or off scripting for students. That is - it enables students to use ScriptCraft's Javascript interpreter without them being ops. Of course, smart students will quickly figure out how to make themselves ops using javascript.

See https://github.com/walterhiggins/ScriptCraft/blob/master/docs/API-Reference.md#classroom-plugin for more information.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .