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
    Is there a way to compile your scriptcraft plugin to a single .jar file that cointains both scriptcraft and your plugins that works out of the box?
    Tony Gravagno
    @TonyGravagno

    Yes. If you open the scriptcraft.jar, you'll see that there is a boot.js file in there. However, like adding code into any other plugin it's probably not a good idea to do injection like this. ScriptCraftJS already has the plugins folder for exactly this purpose. From the doc:

    At server startup the ScriptCraft Java plugin is loaded and begins automatically
    loading and executing all of the modules (javascript files with the extension .js)
    it finds in the scriptcraft/plugins directory".

    Any help?

    Jordi Goyanes Granados
    @jordigoyanes
    Interesting. Would be great to have a gui app that compiles it to a single .jar so you can upload it to the Bukkit Plugins Website :)
    Tony Gravagno
    @TonyGravagno
    That's an interesting concept but why not require ScriptCraft as a pre-requisite, like other plugins require Vault or MultiVerse Core? Then add your code into the plugins directory. That allows your plugin to benefit from updates to ScriptCraft rather than you needing to update your plugin to accommodate changes here. I understand your desire to publish something with your name on it. But in the FOSS world where we Intend for components to interact, for people to be able to share code, for better code re-usability, and for better transparency, in This world the model doesn't agree with that "it all came from here" concept.
    The new website has a marketplace where you will be able to publish your plugins in exactly that way. People will be able to rate and comment your plugins. And you can update them there in the repo just like Bukket plugins.
    So I encourage you to work with the model as it is, and become a leader in this new marketplace as we try to extend the scope of ScriptCraft and get more people to use and develop with it.
    Jordi Goyanes Granados
    @jordigoyanes
    Ok, just thought maybe we could make Scriptcraft plugins more competitive by allowing an optional compilation, like it would be the ultimate reason every bukkit plugin developer would like to build their plugins on ScriptCraft, since it's faster and easier.
    I've been exploiting Scriptcraft since I discovered it just to keep promoting it. For example in this repo: https://github.com/jordigoyanes/LandProtect where I have a cool scriptcraft plugin that allows players to own their land using scriptcraft's integrated json database, there's a readme promoting the use of both JavaScript and ScriptScraft.
    Tony Gravagno
    @TonyGravagno
    That's great but I don't see a good case for making it more difficult for a consumer of your plugin to use or modify it. If they get another ScriptCraft plugin they'll need to get a completely new instance of ScriptCraft. Not only is that not performant but it simply won't work with the default package. Your intent to make it easy has many other consequences .... and it's already easy. So just publish your script, don't bundle with the core. That's a violation of protocol for every core/plugin technology out there.
    Tony Gravagno
    @TonyGravagno
    How would you feel if you needed a different server component like Spigot every time you wanted to use a plugin, because every plugin had a custom version of Spigot built-in? That would leave you with the ability to use just one plugin because others couldn't be added into that package. And that's exactly the same scenario when JS plugins are added into a JAR with ScriptCraft.
    So I'm really hoping that you'll see that every angle of this is not in agreement with what you want to do, that technically it won't work when a site wants to use anything other than your plugins, and that it's all completely unnecessary. There is no good social, business, or technical case for what you're doing. But I really do hope you add your LandProtect plugin to the SC repo when it goes live!
    Jordi Goyanes Granados
    @jordigoyanes
    not trying to violate anything, it's just that there are some newbies who just know how to copy and paste .jar files in their server and have no intention to poke around scripcraft or java or javascript or anything. It could just work like .jar file that decompresses several .js files including your plugin file, making things work out of the box for those newbies.
    Tony Gravagno
    @TonyGravagno
    Uh, if you look at it, the ScriptCraft JAR already includes everything it needs to deploy as just a JAR, just like other plugins. It creates the folders it needs and from there users just add whatever code they want.
    And I recognize that you're trying to do something good here, so nothing else implied... :)
    I have the code in front of me. I'm looking at the source and a JAR that I just built ... it's already all self-contained, with documentation and the ability for developers and gamers to use it as intended.
    Jordi Goyanes Granados
    @jordigoyanes
    For those scripcraft developers that want to make very complex plugins with different modules and even libraries, a .jar bundle that just decompresses that would be great
    Tony Gravagno
    @TonyGravagno
    But that level of sophistication doesn't even need to be bundled with ScriptCraft. Why not have SC as a dependency and someone can create a separate JAR/plugin that installs what they need into the folders prepared by SC? Then the site can update SC without relying on the plugin author (assuming no breaking changes) and the site can still use other plugins.
    How about a compromise... So far your plugin has less than 200 lines in a single .js file. That fits well within SC as currently defined. If your project expands well beyond that, then maybe we should discuss "extended usage". Right now I see your plugin as possibly being one of the first to kickstart a new SC ecosystem. Please don't spoil that by completely isolating your plugin in a way that makes people choose between your one plugin and the rest of the ecosystem. I'm sure you don't want that.
    Jordi Goyanes Granados
    @jordigoyanes
    That's a bit more complicated solution, i mean scripcraft doesn't update very often, but yes your idea could definitely work.
    btw my plugin is just an example xD not a big deal
    Now I'll go to sleep because it's 1:49am in Spain
    Tony Gravagno
    @TonyGravagno
    Awesome. But right now you could offer a plugin at Spigot, advertised as "requires ScriptCraft" with installation instructions that say something like "Add these scripts into plugins, these into modules, and type /reload". That's not tough at all, and far easier than, for example, plugins that require a new launcher.
    kk, gnite!
    Tony Gravagno
    @TonyGravagno
    Can we let CanaryMod die? Please see this forum post and comment wherever you prefer. Thanks! http://bit.ly/2uuNJGW
    Egoscio
    @Egoscio
    I've never even heard of it, but always saw some code repeated to support it.
    Tony Gravagno
    @TonyGravagno
    Latest Status notes published in the Google Group.
    Tony Gravagno
    @TonyGravagno
    Progress on the latest ScriptCraftJS build 3.2.2.4 "Bad Zombie".
    Tony Gravagno
    @TonyGravagno
    Posted another build to my repo with new docs. See release notes.
    Tony Gravagno
    @TonyGravagno
    Latest build is ready for beta. See notes where I've been blogging on progress. Please check the new and existing docs, especially ReadMe, Release Notes, Installation, Permissions, Start and Stop. This release does not have major updates, doesn't support new colors or some new objects. Right now I just want to make sure this just doesn't throw errors, crash, or break any existing code. Please post issues in my repo, not the official/production repo. Thanks!
    lastuniverse
    @lastuniverse
    O_o. I'm glad to see that there is life here. No more naughty questions. Unfortunately for the adaptation of the translation of my module completer.js there is absolutely no time. They are busy preparing the reports on the second chapter of the thesis.
    A later I'll definitely bring the module to a state that allows using it without relying on my other modules.
    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
    :)