Spigot JavaShell 1.5

Run Java programs from both in-game & console.

  1. Ladinn submitted a new resource:

    JavaShell - Run Java programs from both in-game & console.

    Read more about this resource...
     
  2. That's actually a super cool idea, props to you mate, very interested to see what people do with this.
     
    • Like Like x 1
  3. Thank you man, I appreciate the support!
     
  4. I really like this, and think it has a huge amount of potential. I was wondering if you have to source public so people would be able to contribute to it?
     
    • Like Like x 1
  5. Thanks for the support! I've put the source code on GitHub.
     
    • Like Like x 1
  6. Quick question: Does this project support plugin APIs? Like if I had a plugin "Hypercube" with function "run()," could I use this plugin with "Hypercube.run()"?
     
  7. Currently no, but you can still use Java and Bukkit libraries to retrieve and run data from your plugin and its files. However, hopefully sometime in the near future this can be implemented.

    Edit: This is possible as of version 1.3.
     
    #9 Ladinn, May 27, 2017
    Last edited: May 28, 2017
  8. Awesome man, I can't wait to contribute!
     
  9. As of version 1.3 this is now possible! Try it out and let me know what you think.
     
    • Like Like x 1
  10. NullBlox

    Patron

    interesting.... very interesting...
    I suggest a video to show some small example of how this can be used by a noob to a pro. :)
     
  11. Hmmm... not a bad idea. I could make a video if people had questions about something specific, but essentially you only need to know the /run command and basic Java afterward.

    For example:
    [​IMG]
    Code (Text):
    /run Bukkit.getServer().getPlayer("Ladinn").sendMessage(ChatColor.RED + "ATTENTION: " + ChatColor.GOLD + "NullBlox is in the building.");
     
    • Winner Winner x 1
  12. hey what are the permissions?
     
  13. NullBlox

    Patron

    O.O
    Im wondering if one could send a sound from a google.drive (drive api) or similar?
    I've been wanting to host sound files offline for quite sometime and well I also think google has some tools
    to write working scripts etc. You may really want to look into this since it can be a free and easy way for
    users to upload creations to offline database. :) This might be far from what this plugin can do but I feel like
    it could be possible

    EDIT:
    I also think we could use google to make web games that users could play to win prizes on servers.
    This opens up a whole new world! Video
     
    #17 NullBlox, May 28, 2017
    Last edited: May 28, 2017
  14. Again, not a bad idea. In the next update I'm actually working on something similar to this idea: within the /plugins/JavaShell folder will be another folder named "scripts," in which you can put raw .java code that can be run with /run -script [name]. That way you can store and save some pre-written programs.

    In terms of non-Minecraft sounds, you would have to include the sound in a server resource pack, then play it through JavaShell. For example, if your sound replaces the default Minecraft record "Ward," you could load the pack on the server, download it to clients and run:
    Code (Text):
    for(Player player : Bukkit.getOnlinePlayers()) {
    player.playSound(player.getLocation(), Sound.RECORD_WARD, Float.MAX_VALUE, 1.0F);
    }

    For the current version there are no permissions- everything defaults to OP. In the coming update, however, I'll be adding the permission "voxela.javashell."
     
    • Like Like x 1
  15. NullBlox

    Patron

    In terms of non-Minecraft sounds, you would have to include the sound in a server resource pack, then play it through JavaShell. For example, if your sound replaces the default Minecraft record "Ward," you could load the pack on the server, download it to clients and run:
    Code (Text):
    for(Player player : Bukkit.getOnlinePlayers()) {
    player.playSound(player.getLocation(), Sound.RECORD_WARD, Float.MAX_VALUE, 1.0F);
    }
    I mean more custom type sounds.
    I have only made one plugin and well still very much learning java.
    You can add a .json to your resource packs though and have it pull real custom sounds
    from your packs folder. now if your plugin can pull the sounds from external sites.
    This will help a ton on the pack download for users. All custom sounds could be stored offline or
    maybe even inside the server in a separate director like you said with the scripts.

    Here is a example of what I mean by custom sounds. TauntMe (I know I need to get back into this.)
    I almost think this will work just by adding the souds.json lines needed to the resource pack but not to sure.
    All in all I like this plugins potential and possibilities even if they are over my skill level at this time.
     
    • Like Like x 1