ScriptCraft

ScriptCraft

14.6k Downloads

world.time is undefined

nixnax opened this issue · 3 comments

commented
console.log( java.lang.System.getProperty("os.name") )
console.log( java.lang.System.getProperty("os.version") )
console.log( java.lang.System.getProperty("java.version") )
console.log( server.getServerVersion() )
console.log( server.getCanaryModVersion() )
console.log( __plugin )
myworld = server.getWorld('default')
console.log( typeof( myworld.totalTime ) )
console.log( typeof( myworld.time ) )

Produces

[18:36:54] [org.scriptcraftjs.canarymod.ScriptCraftPlugin] [INFO]: Windows 8.1
[18:36:54] [org.scriptcraftjs.canarymod.ScriptCraftPlugin] [INFO]: 6.3
[18:36:54] [org.scriptcraftjs.canarymod.ScriptCraftPlugin] [INFO]: 1.8.0_25
[18:36:54] [org.scriptcraftjs.canarymod.ScriptCraftPlugin] [INFO]: CanaryMod Minecraft Server
[18:36:54] [org.scriptcraftjs.canarymod.ScriptCraftPlugin] [INFO]: 1.7.10-1.1.3
[18:36:54] [org.scriptcraftjs.canarymod.ScriptCraftPlugin] [INFO]: Plugin[Name: 'org.scriptcraftjs.canarymod.ScriptCraftPlugin' Version: '3.0.1-2014-11-14' Author: 'Walter Higgins' JarPath: 'C:\Users\user\Downloads\plugins\scriptcraft.jar']
[18:36:54] [org.scriptcraftjs.canarymod.ScriptCraftPlugin] [INFO]: number
[18:36:54] [org.scriptcraftjs.canarymod.ScriptCraftPlugin] [INFO]: undefined
commented

Use world.totalTime

commented

Will do, but tab complete shows world.time:

/js a=self.world
/js a.<Press TAB-KEY>
commented

I'm afraid there's not much ScriptCraft can do about that. There's a
setTime() but no getTime() . ScriptCraft has no control over JavaBeans
conventions.

On Sat, Jan 3, 2015 at 1:24 AM, nixnax [email protected] wrote:

Will do, but tab complete shows world.time:

/js a=self.world
/js a.


Reply to this email directly or view it on GitHub
#189 (comment)
.

Walter Higgins
Mobile: (+353) 086 8511600
Website: http://walterhiggins.net/