Back to Browse

Ep68. JavaScript Realtime Code Execution - Minecraft Plugin Development (Advanced)

1.6K views
Feb 21, 2025
16:25

Learn how to execute JavaScript code in your Minecraft plugin real-time. WARNING: Executing arbitrary JavaScript code gives the user access to your server files, the ability to run any command as console (or even system root), give oneself OP etc etc. Never let players or unchecked environment execute code; they way I use it in my plugin ChatControl is I only let people who have disk access to setup the plugin to show different format based on JS conditions. In this video, we'll cover: - Project Nashorn — Using Nashorn Java extension to compile JavaScript code on the fly in the game. - Making /js command — Accessing server internals or performing math calculations using a JS-powered command -- WARNING, this is dangerous for players, only use this for testing and for administrators, see above. - Variables — How to parse Java (!) and even PlaceholderAPI variables in JS code. == COURSES == Java & Minecraft Plugin Development: https://mineacademy.org/project-orion?st=yt&sc=tut_ep68 Forge Modding: https://mineacademy.org/forge-mastery?st=yt&sc=tut_ep68 == RESOURCES == Nashorn tutorial 1: https://www.baeldung.com/java-nashorn Nashorn tutorial 2: https://winterbe.com/posts/2014/04/05/java8-nashorn-tutorial/ Source code for this video: https://github.com/kangarko/CowCannon/commit/29a3bdc63ee2b0425003c543bbbe901112d5206b #coding #code #tutorial #money #developer #java #minecraft #minecraftplugin #bukkit #spigot #spigotmc #paper #paperspigot #programming

Download

0 formats

No download links available.