Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jordi Goyanes Granados
    @jordigoyanes
    I have several important variables in my ScripCraft plugin that I want the player to specificate. Is there a way to create a config file?
    Walter Higgins
    @walterhiggins

    I have several important variables in my ScripCraft plugin that I want the player to specificate. Is there a way to create a config file?

    Yes. The easiest way is to use the built-in persist() function like this...

    var playerName = player.name;
    var playerConfig = persist(playerName + '-myconfig', {} );
    playerConfig.strengths = ['flight', 'magic' ];
    playerConfig.weaknesses = ['arachnophobia' ];

    The player config will automatically be saved to a .json file in the scriptcraft/data/ directory.

    @TonyGravagno @jordigoyanes I really like the idea of lightweight jars composed only of .js with a dependency on scriptcraft.jar - I wonder what would be needed to make this work. It would definitely result in smaller bukkit jar files.
    Jordi Goyanes Granados
    @jordigoyanes
    thanks! about the lightweight jars, I think it can be done easily
    Walter Higgins
    @walterhiggins
    I'll take a look into this too. It would be really neat if you could just specify scriptcraft as a dependency in your jar's manifest file and just bundled a /modules and /plugins folder for scriptcraft-based plugins.
    (that is - have a bukkit/spigot plugin which has zero java code - I don't know if this is possible - worth investigating)
    Jordi Goyanes Granados
    @jordigoyanes
    Nice. Would also be great if you could easily create that bundle using a simple command that leaves a lightweight .jar ready to go.
    Meldiron
    @Meldiron

    Hello :)
    In NodeJS I can use let and const instead of using var. Its better, variable destroy itself when block of code where it has been declared ends.

    I tried to use:
    let i = 5
    in scriptcraft, but it didnt work.
    Is there any way to make it works?

    Walter Higgins
    @walterhiggins
    If you're feeling adventurous you can build from source and use babel for es6 features.
    https://walterhiggins.net/blog/Writing-Minecraft-Mods-in-ES6
    Meldiron
    @Meldiron
    Did not work. Command: /js require('babel-register') gave me error
    Max Metral
    @djMax
    does ScriptCraft support 1.12 now?
    Jordi Goyanes Granados
    @jordigoyanes
    yes
    daveweb
    @daveweb
    Hi, I am new into scriptcraftjs(and also a bit in minecraft). I start using it since last week. I succesfully tried already some example and build my own custom function. Building a pyramid. Sofar so good.
    I was wondering, is it posibble to rotate a block in Minecraft? I would like to build a funfair a would like to turn some objects(carousel, big wheel). Is this possible?
    kieppie
    @kieppie
    mic check
    coool
    really dig this project
    gonna try use it as a teaching aid
    looking at blocklycraft in particular
    Tony Gravagno
    @TonyGravagno
    :)
    @daveweb To do what you're asking, I'd consider adding the WorldEdit plugin, and then send it commands to do what's required. That way you don't need to "re-invent the wheel". Or to avoid pulling in a massive plugin like that just for this one function, fork that project, and create a branch that just includes the rotation component.
    Tony Gravagno
    @TonyGravagno
    That plugin does sometimes get things wrong. It rotates a mass of blocks but misses details like chest orientation. And in the process of removing the original block set to replace it with another, we see frames losing their contained items, etc.
    With all of the changes in v1.13 to the inner structure of items and entities, all of this might be easier than in 1.12 and prior. No clue on that bleeding-edge yet. Good luck!
    daveweb
    @daveweb
    @TonyGravagno Thanks for your response, Can you tell me where to find that worldEdit plugin?
    Tony Gravagno
    @TonyGravagno
    joeldamien
    @joeldamien
    Is this project dead?
    BitHacked
    @Cryogena_twitter
    how do i access the inventory of a chest? lol
    Tony Gravagno
    @TonyGravagno
    Give the Google Group a ping since you haven't seen any activity here: https://groups.google.com/forum/?fromgroups#!forum/scriptcraft---scripting-minecraft
    hedgty
    @hedgty
    Hey, How would I hook into vault?
    Rayan Desfossez
    @rayandfz
    Hello
    It's possible to create javascript plugin and not use /js for execution ?
    for example for hello command plugin
    just make /hello than /js hello()
    Paul Richards
    @Paulware
    Created a(nother) blockly scriptcraft solution: https://github.com/Paulware/BlocklyScriptcraft. I appreciate any comments. Also has anyone got a scriptcraft version that works with 15.2? I keep getting the javascript engine error.
    lnadav
    @lnadav-1
    Can I make a script that connects me to a server, takes a screenshot then disconnects and then waits 10 minutes, then repeats it all forever?
    Just wondering if such a thing is possible? im on java edition 1.12.2 if that helps
    I dont have operator commands becuase its not my server, however the admin says that im allowed to use scripts and macros ect
    RandomTNT
    @RandomTNT
    Hi
    alenosEMPEROR-program
    @alenosEMPEROR-program
    hi
    alenosEMPEROR-program
    @alenosEMPEROR-program
    How to install scriptCraft on minecraft 15.2 server? I install scriptCraft, put it in plugins directories, and start my server, but all I get is "No JavaScript Engine available. ScriptCraft will not work without Javascript."???
    help?
    Paulius Gečas
    @TheOnlyGhostwolf
    Hi all! Just a quick question, if the plugin is still being developed?
    Vixel V Vixel
    @Tqcoz
    will it work on version 1.8?
    jdefgh
    @jdefgh
    hey does the 1.15.2 release work with 1.16.4? I don't know anything about plugin version compability.
    Taob-arch
    @Taob-arch
    im getting "[scriptcraft] No JavaScript Engine available. ScriptCraft will not work without Javascript."
    Ahmad Herzallah
    @AhmadHerzallah

    Hey, when I run
    /js up().box( blocks.wool.black, 4, 9, 1 )
    it gives me an error saying:

    [03:49:00] [Server thread/ERROR]: [scriptcraft] Error while trying to evaluate javascript: up().box(blocks.wool.black, 4, 9, 1), Error: java.lang.RuntimeException: javax.script.ScriptException: ReferenceError: "up" is not defined in <eval> at line number 1
    [03:49:00] [Server thread/ERROR]: [scriptcraft] javax.script.ScriptException: java.lang.RuntimeException: javax.script.ScriptException: ReferenceError: "up" is not defined in <eval> at line number 1 in <eval> at line number 695 at column number 8
    [03:49:00] [Server thread/WARN]: javax.script.ScriptException: java.lang.RuntimeException: javax.script.ScriptException: ReferenceError: "up" is not defined in <eval> at line number 1 in <eval> at line number 695 at column number 8

    nathan c
    @nac5604
    Anyone still here?
    If so, im having an issue when using ScriptCraft on my 1.17.1 server. Whenever i do /js 1 + 1 it just says "/js JavaScript Code" back to me.
    Any idea of why this is?