reinstating bukkit as build target.
This commit is contained in:
parent
0866097411
commit
4e623299ae
4 changed files with 26 additions and 7 deletions
16
build.xml
16
build.xml
|
@ -2,6 +2,7 @@
|
||||||
<property file="build.properties"/>
|
<property file="build.properties"/>
|
||||||
<description>Builds the scriptcraft.jar file - a plugin for bukkit</description>
|
<description>Builds the scriptcraft.jar file - a plugin for bukkit</description>
|
||||||
<property name="src.canary" location="src/main/java/canary"/>
|
<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="build" location="target/classes"/>
|
||||||
<property name="dist" location="target/" />
|
<property name="dist" location="target/" />
|
||||||
<property name="minecraft.dir" location="${dist}/minecraft" />
|
<property name="minecraft.dir" location="${dist}/minecraft" />
|
||||||
|
@ -25,14 +26,19 @@
|
||||||
</target>
|
</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"
|
<javac includeantruntime="false"
|
||||||
srcdir="${src.canary}"
|
|
||||||
source="1.6"
|
source="1.6"
|
||||||
target="1.6"
|
target="1.6"
|
||||||
destdir="${build}"
|
destdir="${build}"
|
||||||
debug="true"
|
debug="true">
|
||||||
classpath="lib/canary.jar" />
|
<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>
|
||||||
|
|
||||||
<target name="gendocs" depends="construct-ypgpm, construct-api-ref" description="Generate API documentation">
|
<target name="gendocs" depends="construct-ypgpm, construct-api-ref" description="Generate API documentation">
|
||||||
|
@ -189,7 +195,7 @@ Walter Higgins
|
||||||
</zip>
|
</zip>
|
||||||
</target>
|
</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 -->
|
<!-- ensure plugin.yml is always copied -->
|
||||||
<delete file="${build}/plugin.yml" />
|
<delete file="${build}/plugin.yml" />
|
||||||
<copy todir="${build}">
|
<copy todir="${build}">
|
||||||
|
|
BIN
lib/bukkit-1.7.9-R0.2.jar
Normal file
BIN
lib/bukkit-1.7.9-R0.2.jar
Normal file
Binary file not shown.
3
src/main/js/lib/canary.js
Normal file
3
src/main/js/lib/canary.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module.exports = function( container ) {
|
||||||
|
|
||||||
|
};
|
|
@ -724,7 +724,7 @@ all of Javascript's Array goodness.
|
||||||
var worlds = utils.array(server.worlds);
|
var worlds = utils.array(server.worlds);
|
||||||
|
|
||||||
***/
|
***/
|
||||||
exports.array = function( ){
|
function toArray( ){
|
||||||
var result = [],
|
var result = [],
|
||||||
javaArray = null,
|
javaArray = null,
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -745,7 +745,17 @@ exports.array = function( ){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
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
|
### utils.players() function
|
||||||
|
|
||||||
|
|
Reference in a new issue