reinstating bukkit as build target.

This commit is contained in:
walterhiggins 2014-10-18 11:05:30 +01:00
parent 0866097411
commit 4e623299ae
4 changed files with 26 additions and 7 deletions

View file

@ -2,6 +2,7 @@
<property file="build.properties"/>
<description>Builds the scriptcraft.jar file - a plugin for bukkit</description>
<property name="src.canary" location="src/main/java/canary"/>
<property name="src.bukkit" location="src/main/java/bukkit"/>
<property name="build" location="target/classes"/>
<property name="dist" location="target/" />
<property name="minecraft.dir" location="${dist}/minecraft" />
@ -25,14 +26,19 @@
</target>
<target name="compile-canary" depends="init" description="compile canary plugin source">
<target name="compile-plugins" depends="init" description="compile canary plugin source">
<javac includeantruntime="false"
srcdir="${src.canary}"
source="1.6"
target="1.6"
destdir="${build}"
debug="true"
classpath="lib/canary.jar" />
debug="true">
<src path="${src.canary}"/>
<src path="${src.bukkit}"/>
<classpath>
<pathelement path="lib/canary.jar" />
<pathelement path="lib/bukkit-1.7.9-R0.2.jar" />
</classpath>
</javac>
</target>
<target name="gendocs" depends="construct-ypgpm, construct-api-ref" description="Generate API documentation">
@ -189,7 +195,7 @@ Walter Higgins
</zip>
</target>
<target name="package" depends="gendocs,zip_js,compile-canary" description="generate the distribution" >
<target name="package" depends="gendocs,zip_js,compile-plugins" description="generate the distribution" >
<!-- ensure plugin.yml is always copied -->
<delete file="${build}/plugin.yml" />
<copy todir="${build}">

BIN
lib/bukkit-1.7.9-R0.2.jar Normal file

Binary file not shown.

View file

@ -0,0 +1,3 @@
module.exports = function( container ) {
};

View file

@ -724,7 +724,7 @@ all of Javascript's Array goodness.
var worlds = utils.array(server.worlds);
***/
exports.array = function( ){
function toArray( ){
var result = [],
javaArray = null,
i = 0;
@ -745,7 +745,17 @@ exports.array = function( ){
}
}
return result;
};
}
exports.array = toArray;
function canaryWorlds(){
return toArray( server.worlds );
}
function bukkitWorlds(){
return toArray( server.worldManager.allWorlds );
}
exports.worlds = __plugin.canary ? canaryWorlds : bukkitWorlds;
/*************************************************************************
### utils.players() function