Code Monkey home page Code Monkey logo

scriptcraft's People

Contributors

aplhk avatar carlrobert avatar cgmartin avatar cobbzilla avatar edonaldson avatar gitter-badger avatar jasonk avatar jonathanperret avatar jwulf avatar kabiroberai avatar kmlawson avatar kylehowells avatar m4chinations avatar marcogerosa avatar marcvangend avatar monowii avatar mrvoltz avatar nixnax avatar pvginkel avatar rupl avatar schramp avatar shaneriley avatar stlee987 avatar tclavier avatar tiagofassoni avatar tonygravagno avatar triyuga avatar trmfreitas avatar vorburger avatar walterhiggins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scriptcraft's Issues

/js load() not finding the plugins for bukkit

When I try: /js load('./castle')

I get an error about the file not being found. I have placed drone.js, fort.js, and castle.js in js-plugins which is found in the craftbukkit directory.

What is the correct path for the load() call?

castle

Where would one find the js code for castle()?

Possible to have multiline JavaScript?

Is it possible to allow users to run longer JavaScript code than a single line? The line is limited in length as it is. Ideally files can be loaded. Seems like this used to be supported via the /js load() command for the MCP version. Is there a similar mechanism for the Bukkit version?

Perform js excecution in background

When running a particularly lengthy script, the server gets bogged down and disconnects users. It would be nice if console commands and loaded scripts were launched in a separate thread with limited computational resources on the server (execute a limited number of js statements per second or similar) to prevent it from disconnecting users.

Additionally, each command could be given its own id so we can kill the thread if needed (infinite loop for example). Current executing commands could be listed with a function appropriately named (/js jobs, /js kill :id)

Alternatively, provide a data structure that lets the user opt into a separate managed thread of execution easily in javascript without having to dive into usage of java.lang.Thread directly.

Thanks,
Alex

Announce when load() is successful by default

When I first got started I was luckily able to check the server console, but I never got any positive sign that drone.js et. al were loading.

I found a line claiming to do this in _scriptcraft.js -- where do we set that verbose flag? Either way since this is basically the first thing someone does it might eliminate some confusion when people get started.

Extensions to Drone

Can these be added to the Drone object? I haven't pulled the latest, so they may already be there:

Drone.extend('getLocation', function() {
return org.bukkit.Location(this._getWorld(), this.x, this.y, this.z);
});
Drone.extend('setPos', function(x, y, z, dir) {
if (x) this.x = x;
if (y) this.y = y;
if (z) this.z = z;
if (dir) this.dir = dir;

return this;

});

Example Scripts Expect drone.js To Be One Level Higher

The example scripts expect the drone.js file to be up one level in the dir structure. However, the install instructions say to play all JS files into one flat dir.

Obviously not a big deal!

BTW: Thanks for this--it's a lot of fun.

getBlock() method undefined

On the github homepage for ScriptCraft it lists the following method:

getBlock( x, y, z ) - returns the blockId and metadata at the given location (if no coordinates are given the cross-hair location is used)

But if I do a /js getBlock() I get the following error:

15:37:45 [SEVERE] Caused by: sun.org.mozilla.javascript.internal.EvaluatorException: Can't find method org.bukkit.craftbukkit.v1_4_R1.CraftWo
rld.getBlockAt(sun.org.mozilla.javascript.internal.Undefined,sun.org.mozilla.javascript.internal.Undefined,sun.org.mozilla.javascript.interna
l.Undefined). (<Unknown source>#94)
15:37:45 [SEVERE]       at sun.org.mozilla.javascript.internal.DefaultErrorReporter.runtimeError(Unknown Source)
15:37:45 [SEVERE]       at sun.org.mozilla.javascript.internal.Context.reportRuntimeError(Unknown Source)

Support for Bukkit/Craftbukkit

This is pretty amazing work - I'm currently diving deep to see the potential of it all. It would be awesome if there was a way to make this compatible with Bukkit/Craftbukkit.

Alignment of blocks changing

The script below recreate the problem if you call it with /js track(48, 15);

When facing one direction the track comes out correctly. In particular the detector, powered, detector grouping of tracks is fine.

However, if you turn and create a track perpendicular to this. Then the second detector rail, in each boost grouping is laid down at right angles to the rest of the track. I'd like the say the realignment of the track block is random, but there does appear to be a pattern to it.

Drone.extend('track', function(length, boostGap)
{
    if ( typeof length == "undefined" ) {
        length = 10;
    }
    if ( typeof boostGap == "undefined" ) {
        boostGap = 15;
    }

    this.chkpt('track');
    this.box(1,3,1,length) // Track base - type, width, height, depth
        .up().box(0,3,2,length) // clear above
        .right().box(66,1,1,length); // Lay the basic initial track

    var left = length;

    while ( left >= 3 ) {
        this.box(28,1,1,1).fwd() // Detector Rail
            .box(27,1,1,1).fwd() // powered rail
            .box(28,1,1,1).fwd(boostGap-2)
        left = left - boostGap;
    }

    return this
});

Question on generating entities

I don't know if this is the best/right place to leave these kind of questions. If not, please direct me to the correct place, and I will glad ask them there.

I'm trying to generate entities to populate some structures that I am creating. I would like to do something like the following, but I cannot get it to work:

/js self.world.spawnEntity(self.location.clone().add(10,0,0),org.bukkit.EntityType.PIG)

As a simple example, I was hoping this would spawn a pig 10 blocks from me. But I get an error.

Levers only appear in 1 orientation

Is there a way to make levers appear in a particular orientation? No matter what I do, they always appear the same way, whether by drone or by the putBlock method. I have students create elaborate circuits or other contraptions and then they have to place levers to make them work. I previously had to get a server plugin to disable all destroying and placing of blocks, so they have to use ScriptCraft to do so (way too distracting otherwise).

"You don't have ScriptCraftPlugin..js"

Strange problem... on one of my machines I get this error when trying to run any ScriptCraft function. For example, I type '/js echo("hi")' and I see the error above. The CraftBukkit console shows that the command was received (it says " issued server command: ..."). ScriptCraft has worked on this machine before, but I don't know what changed or where to troubleshoot it now. I haven't yet set up a development environment to debug it. It's an Ubuntu 64-bit machine using Oracle Java 7.10, I've cleared out ~/.minecraft and re-downloaded everything. Note the double periods in the error message, maybe that's a clue?

Coffeescript?

Have you considered Coffeescript? It seems much easier to teach than Javascript.

I've had success with teaching my oldest a bit, but that just may be my familiarity with Coffeescript compared to Javascript.

"You don't have scriptcraft.evaluate permission"

Log:

30.01 18:05:29 [Server] INFO Wh1teT1ger died
30.01 18:05:18 [Server] INFO Wh1teT1ger[/82.46.99.205:51649] logged in with entity id 28 at ([Test] -964.5, 4.0, -382.5)
30.01 18:05:10 [Server] Startup Done (1.996s)! For help, type "help" or "?"
30.01 18:05:10 [Server] INFO Server permissions file permissions.yml is empty, ignoring it
30.01 18:05:10 [Server] INFO [ScriptCraftPlugin] Enabling ScriptCraftPlugin v1.4.7-20130126
30.01 18:05:10 [Server] INFO Preparing spawn area: 28%
30.01 18:05:10 [Server] INFO Preparing start region for level 1 (Seed: -8069096820369105479)
30.01 18:05:09 [Server] INFO Preparing start region for level 0 (Seed: -8069096820369105479)
30.01 18:05:08 [Server] INFO ----- ------------------- -----

The log shows no error and actually shows that scriptcraft is running. However when I try and execute the command: "/js up().box('35:15', 4, 9, 1)" I get the message "You don't have scriptcraft.evaluate permission". I can kill ('/kill') myself on the server so surely it can't be the permissions granted to the player by multicraft.

What's wrong? My js-plugins folder is in the '/' folder rather than in the 'plugins' folder. Could this be the issue?

JS not loading js-plugins

Here is the log

2013-01-04 23:12:39 [INFO] Starting minecraft server version 1.4.5
2013-01-04 23:12:39 [INFO] Loading properties
2013-01-04 23:12:39 [INFO] Default game type: SURVIVAL
2013-01-04 23:12:39 [INFO] Generating keypair
2013-01-04 23:12:39 [INFO] Starting Minecraft server on *:25565
2013-01-04 23:12:40 [INFO] This server is running CraftBukkit version git-Bukkit-1.4.5-R1.0-b2543jnks (MC: 1.4.5) (Implementing API version 1.4.5-R1.0)
2013-01-04 23:12:40 [INFO] [ScriptCraftPlugin] Loading ScriptCraftPlugin v0.01
2013-01-04 23:12:40 [INFO] Preparing level "world"
2013-01-04 23:12:40 [INFO] Preparing start region for level 0 (Seed: 3408191539297853076)
2013-01-04 23:12:41 [INFO] Preparing start region for level 1 (Seed: 3408191539297853076)
2013-01-04 23:12:41 [INFO] Preparing spawn area: 28%
2013-01-04 23:12:41 [INFO] Preparing start region for level 2 (Seed: 3408191539297853076)
2013-01-04 23:12:41 [INFO] [ScriptCraftPlugin] Enabling ScriptCraftPlugin v0.01
2013-01-04 23:12:41 [INFO] [ScriptCraftPlugin] ScriptCraft enabled.
2013-01-04 23:12:42 [INFO] [ScriptCraftPlugin] js> load("C:\CraftBukkit\js-plugins\drone.js")
2013-01-04 23:12:42 [SEVERE] java.io.FileNotFoundException: C:CraftBukkitjs-pluginsdrone.js (The system cannot find the file specified)
2013-01-04 23:12:42 [SEVERE] at java.io.FileInputStream.open(Native Method)
2013-01-04 23:12:42 [SEVERE] at java.io.FileInputStream.(Unknown Source)
2013-01-04 23:12:42 [SEVERE] at java.io.FileReader.(Unknown Source)
2013-01-04 23:12:42 [SEVERE] at net.walterhiggins.scriptcraft.ScriptCraftEvaluator.load(ScriptCraftEvaluator.java:104)
2013-01-04 23:12:42 [SEVERE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-01-04 23:12:42 [SEVERE] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-01-04 23:12:42 [SEVERE] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-01-04 23:12:42 [SEVERE] at java.lang.reflect.Method.invoke(Unknown Source)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.gen._cmd__1._c_script_0(:1)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.gen._cmd__1.call()
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.gen._cmd__1.call()
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.gen._cmd__1.exec()
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.Context.evaluateString(Context.java:1079)
2013-01-04 23:12:42 [SEVERE] at net.walterhiggins.scriptcraft.ScriptCraftEvaluator.eval(ScriptCraftEvaluator.java:65)
2013-01-04 23:12:42 [SEVERE] at net.walterhiggins.scriptcraft.ScriptCraftPlugin.onEnable(ScriptCraftPlugin.java:30)
2013-01-04 23:12:42 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
2013-01-04 23:12:42 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
2013-01-04 23:12:42 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
2013-01-04 23:12:42 [SEVERE] at org.bukkit.craftbukkit.v1_4_5.CraftServer.loadPlugin(CraftServer.java:272)
2013-01-04 23:12:42 [SEVERE] at org.bukkit.craftbukkit.v1_4_5.CraftServer.enablePlugins(CraftServer.java:254)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.MinecraftServer.j(MinecraftServer.java:320)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.MinecraftServer.e(MinecraftServer.java:299)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.MinecraftServer.a(MinecraftServer.java:258)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.DedicatedServer.init(DedicatedServer.java:147)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.MinecraftServer.run(MinecraftServer.java:398)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.ThreadServerApplication.run(SourceFile:856)
2013-01-04 23:12:42 [INFO] [ScriptCraftPlugin] Error - File not found C:CraftBukkitjs-pluginsdrone.js
2013-01-04 23:12:42 [SEVERE] org.mozilla.javascript.EvaluatorException: Couldn't open file "C:CraftBukkitjs-pluginsdrone.js". (#1)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:64)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.Context.reportError(Context.java:872)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.Context.reportError(Context.java:890)
2013-01-04 23:12:42 [SEVERE] at net.walterhiggins.scriptcraft.ScriptCraftEvaluator.load(ScriptCraftEvaluator.java:110)
2013-01-04 23:12:42 [SEVERE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-01-04 23:12:42 [SEVERE] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-01-04 23:12:42 [SEVERE] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-01-04 23:12:42 [SEVERE] at java.lang.reflect.Method.invoke(Unknown Source)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.gen._cmd__1._c_script_0(:1)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.gen._cmd__1.call()
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.gen._cmd__1.call()
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.gen._cmd__1.exec()
2013-01-04 23:12:42 [SEVERE] at org.mozilla.javascript.Context.evaluateString(Context.java:1079)
2013-01-04 23:12:42 [SEVERE] at net.walterhiggins.scriptcraft.ScriptCraftEvaluator.eval(ScriptCraftEvaluator.java:65)
2013-01-04 23:12:42 [SEVERE] at net.walterhiggins.scriptcraft.ScriptCraftPlugin.onEnable(ScriptCraftPlugin.java:30)
2013-01-04 23:12:42 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
2013-01-04 23:12:42 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
2013-01-04 23:12:42 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
2013-01-04 23:12:42 [SEVERE] at org.bukkit.craftbukkit.v1_4_5.CraftServer.loadPlugin(CraftServer.java:272)
2013-01-04 23:12:42 [SEVERE] at org.bukkit.craftbukkit.v1_4_5.CraftServer.enablePlugins(CraftServer.java:254)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.MinecraftServer.j(MinecraftServer.java:320)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.MinecraftServer.e(MinecraftServer.java:299)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.MinecraftServer.a(MinecraftServer.java:258)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.DedicatedServer.init(DedicatedServer.java:147)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.MinecraftServer.run(MinecraftServer.java:398)
2013-01-04 23:12:42 [SEVERE] at net.minecraft.server.v1_4_5.ThreadServerApplication.run(SourceFile:856)
2013-01-04 23:12:42 [INFO] [ScriptCraftPlugin] Exception: Couldn't open file "C:CraftBukkitjs-pluginsdrone.js". (#1)
2013-01-04 23:12:42 [INFO] Server permissions file permissions.yml is empty, ignoring it
2013-01-04 23:12:42 [INFO] Done (1.974s)! For help, type "help" or "?"

Time out while browsing for .js to load.

Trying to load the script manually (still not loading on it's own with out issue while in js-plugins) and it gives a timeout if you take to long to find what your looking for. (Under a minute).

2013-01-05 00:40:31 [INFO] undefined�[m
2013-01-05 00:40:31 [INFO] [ScriptCraftPlugin] undefined
2013-01-05 00:40:31 [INFO] p4r4d0x42 lost connection: disconnect.endOfStream

Object Variable Names Squashed

Defining objects in the /js console or loaded from script files with /js load() are getting "squashed".

Example:
/js var myObj = {test:"hello"};

The engine now sees the following variables as defined:
myObj
myObjtest

Notice no '.' separator on myObjtest
myObjtest should never be defined in this manner; the test property should only be accessible via myObj.test

Thanks,
Alex

Cannot read property "x" from null

When trying to load drone.js in the bukkit version, I get the following error:

 org.mozilla.javascript.EcmaError: TypeError: Cannot read property "x" from null (/Users/abrams/craftbukkit/js-plugins/drone.js#265)

Can't call putBlock or putSign

I can call the other methods listed on the ScriptCraft github homepage. And I can call things like cottage(). But /js putBlock(246,64,80,5,0); gives me the following error when trying to put a wood block near me:

15:28:54 [SEVERE] javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped java.lang.NullPointerException
(<Unknown source>#70) in <Unknown source> at line number 70
15:28:54 [SEVERE]       at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
15:28:54 [SEVERE]       at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)

/js putBlock(246, 64, 80, 5, null); gives me the following error which is a little different:

15:29:34 [SEVERE] javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Can't find method org.bukkit.craftbuk
kit.v1_4_R1.block.CraftBlock.setTypeIdAndData(number,null,boolean). (<Unknown source>#70) in <Unknown source> at line number 70
15:29:34 [SEVERE]       at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
15:29:34 [SEVERE]       at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
15:29:34 [SEVERE]       at javax.script.AbstractScriptEngine.eval(Unknown Source)

What should I be specifying for metaData? Am I doing something wrong?

<Unknown Source> in Errors

When a script file throws an error, the error message gives an ugly Error. For example:
at line number 1 (#33) in at line number 33

EDIT:
Inserting something like
this.engine.put(this.engine.FILENAME,boot.getCanonicalPath().replaceAll("\","/"));
after line 100 of ScriptCraftPlugin.java
could give better messages.

.class File Distribution?

Forgive me if I'm misinterpreting something, but in step seven of your installation process, you mention taking the compiled files and repackaging them back into the minecraft.jar file.

Are these files .class files? Because the standard way of distributing Minecraft mods is distributing those .class files themselves for people to drop into their instance of Minecraft. I know we'll still (might) have to set up Rhino, and some directories, but if I'm right it would knock off a good chunk of the installation progress if each person who wanted to use the mod didn't need to create these files themselves.

MCP installation mechanism doesn't work

I installed MCP as directed. Is this now deprecated? Anyway, I followed the instructions and when recompiling I get errors stating that ScriptCraftEvaluator, ScriptCraftMCP, etc classes are missing. So I copied those over to my mcp726a/src/minecraft/net/minecraft/src directory too. Then recompiling and reobfuscating works fine. I copy the reobfed classes to the minecraft.jar file and the game runs.

Now I try to load the cottage.js file as in the getting started instructions. But I get an error that __folder is undefined. That seems to be the mechanism to load dependent javascript files. So I try a /js var __folder = '' so I can load at least 1 of the javascripts... no luck. I can't seem to load any javascripts even with absolute directory paths. What's with __folder?

I'm on a Mac with Mountain Lion.

I want students to be able to program JavaScript without connecting to a server. That's why I went this route. I guess I can just try out the Bukkit thing and have a server installed locally on their machines?

Need to define cuboid area

Is there a way for you to define a cuboid area?
I'm trying to develop a pvp script. But I need to define a cuboid area with a tool.
(As in world edit with a wooden axe)
So anyone can set a cuboid area to play pvp in teams.
Can anyone help me?

Thanks, Fearful.

Add a new command which is executable by all (non-ops too)

The goal is to be able to add new console commands via javascript - however, only operators should have access to the js command so for an op to create a new javascript function and have that function executable by all, it needs to be exposed via another command.

That command will be jsp - (short for js plugin , or js proxy or js protected - take your pick). jsp won't in fact evaluate any javascript code - that would leave the server wide open for all players - instead it looks up a lookup table of javascript functions which have been exposed for use by players.
For example...

/jsp home set

will make the plugin lookup a table to see if there is a 'home' javascript function defined and if there is it calls that function passing in each argument. The distinction between js and jsp is this - js evaluates javascript. jsp looks up a table for a specific javascript function (the 1st parameter supplied to jsp) and invokes that function passing in all subsequent parameters.
The plan is to use the common (among bukkit plugins/servers) home plugin commands as a test-bed.

basic commands:
/jsp home - takes the player home.
/jsp home set - sets the player's current location as home.
/jsp home delete - delete the home reference
/jsp home help - prints help about the command

social commands:
/jsp home - go to 's home.
/jsp home list - display whose homes you can visit
/jsp home ilist - display who can visit your home
/jsp home invite - invite player to your home
/jsp home uninvite - uninvite
/jsp home public - make your home public (anyone can visit)
/jsp home private - make your home private

admin commands:
/jsp home listall - list all of the homes on the server.
/jsp home clear - clears player's home from server.

See http://dev.bukkit.org/server-mods/myhome/ for reference.

Pyramid Generator

load(__folder + "drone.js")
//
// constructs a pyramid
//
Drone.extend('pyramid', function(block, height) {
this.chkpt('pyramid');

for (var i = height; i > 0; i -= 2) {
    this.box(block, i, 1, i).up().right().fwd();
}

return this.move('pyramid');

});

Drone.extend('pyramid0', function(block, height) {
this.chkpt('pyramid0');

for (var i = height; i > 0; i -= 2) {
    this.box0(block, i, 1, i).up().right().fwd();
}

return this.move('pyramid0');

});

How to reload

I don't see that the reload command is exposed anymore. how do you reload JS files that you create and modify in the js_plugins directories?

For instance, I'd like to create a folder js-plugins/mine to put my own js files in as I develop and test, but I can't figure out how to get modified files to reload unless I shut down and restart the bukkit server.

In addition, if we create our own useful plugins (like a pyramid, similar to your temple, or an entire dungeon creator), do you want to know about them to include in your repository?

reorganise source directory

rename bukkit-plugin to src
move js-plugins to src/javascript
add readme.md for the src/javsacript directory and subdirectories.

Need to improve bukkit event handling

No way to unregister a listener.
Suspect the current bukkit.on() implementation is broken, Listener and RegisteredListener should be the same object?

Negative height for boxes etc. to build down instead of up

It would be nice if one could specify negative values for height when calling box() etc. to build downwards instead of upwards.

Of course the more or less same result can be achieved by down(20).box(4,1,20,1) instead of (box,4,1,-20,1) but that feels like a lot of typing.

Forge API

Forge would be a good api to expose

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.