{"id":88602,"date":"2026-06-05T04:32:24","date_gmt":"2026-06-05T01:32:24","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/"},"modified":"2026-06-05T04:32:24","modified_gmt":"2026-06-05T01:32:24","slug":"jspig","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/","title":{"rendered":"JsPig"},"content":{"rendered":"<div style=\"text-align:center;\"><img loading=\"lazy\" decoding=\"async\" height=\"320\" width=\"200\" src=\"https:\/\/img.shields.io\/badge\/JsPig-package?style=flat-square&#038;link=JsPig\"\/><\/div>\n<p># Description<\/p>\n<p>JsPig provides complete access to the Bukkit API via GraalVM, allowing developers to efficiently create and manage Minecraft plugins using JavaScript&#8217;s flexibility and simplicity.<\/p>\n<p># Getting Started<\/p>\n<p>> Before you start, please use `GraalVM JDK 21` as your development environment and the environment for running Java programs.<\/p>\n<p>1.  Place the plugin in the `plugins` folder of your `bukkit`-series server.<br \/>\n2.  Start the server, and the plugin will automatically generate a folder with the same name as the plugin in the `plugins` directory. Enter the command `JsPig declare` in the console to generate the declaration file `global.d.ts`.<br \/>\n3.  Open the plugin&#8217;s data folder with `VSCode` to start writing `JavaScript` plugins.<\/p>\n<p>## Advanced Features<\/p>\n<p>*   Create a new folder in the plugin&#8217;s data directory, naming it according to general naming conventions. Within this folder, create a `package.json` file and include the following code:<\/p>\n<p>&#8220;`<br \/>\n{<br \/>\n  &#8220;main&#8221;: &#8220;.\/block.js&#8221;,<br \/>\n  &#8220;modules&#8221;: [<br \/>\n    &#8220;registry&#8221;,<br \/>\n    &#8220;scripts-manager&#8221;,<br \/>\n    &#8220;console&#8221;,<br \/>\n    &#8220;timer&#8221;<br \/>\n  ]<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p>*   Then, create a file named `block.js` in the folder to enable advanced plugin development.<\/p>\n<p>`block.js` is just an example file; you can name it anything.<\/p>\n<p>### Configurable Options in `modules`:<\/p>\n<p>*   `registry` for event registration.<br \/>\n*   `scripts-manager` for script management.<br \/>\n*   `console` for logging.<br \/>\n*   `timer` for precise timing, adding support for `setTimeout`, `setInterval`, `clearTimeout`, and `clearInterval`.<\/p>\n<p># Custom Commands<\/p>\n<p>Each `package.json` in a folder can define custom commands. An example configuration is as follows:<\/p>\n<p>&#8220;`<br \/>\n{<br \/>\n  &#8220;command&#8221;: {<br \/>\n    &#8220;command&#8221;: &#8220;list&#8221;,<br \/>\n    &#8220;description&#8221;: &#8220;List all subcommands&#8221;,<br \/>\n    &#8220;usage&#8221;: &#8220;Use \/<main command> list&#8221;,<br \/>\n    &#8220;permission&#8221;: &#8220;JsPig.JsExtend.List&#8221;,<br \/>\n    &#8220;permissionMessage&#8221;: &#8220;You do not have permission to use this command.&#8221;<br \/>\n  }<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p>&#8220;`<br \/>\n\/\/ JsExtend.list corresponds to &#8220;command&#8221;: &#8220;list&#8221;. JsExtend. is a fixed prefix and is case-sensitive.<br \/>\nregistry.on(&#8220;JsExtend.list&#8221;, (sender, command, args) => {<\/p>\n<p>})<br \/>\n&#8220;`<\/p>\n<p>**Note: A `package.json` can only define one command.**<\/p>\n<p>To allow players to use the command correctly, such as the `list` command above, you need a permission management plugin like `LuckPerms-Bukkit`.<\/p>\n<p>Add a permission node like `JsPig.JsExtend.List` (case-insensitive), set the value of the permission node to `true`, and reload permissions on the server. Players will then be able to use the command.<\/p>\n<p>In the game, enter the command: `\/jsextend list` or `\/jse list`.<\/p>\n<p>If your custom command has additional options, use `\/jse <command> <command option><option>`. You can retrieve these options via `args`.<\/p>\n<p>Below is the full `package.json` configuration for using a custom command:<\/p>\n<p>&#8220;`<br \/>\n{<br \/>\n  &#8220;main&#8221;: &#8220;.\/block.js&#8221;,<br \/>\n  &#8220;modules&#8221;: [<br \/>\n    &#8220;registry&#8221;<br \/>\n  ],<br \/>\n  &#8220;command&#8221;: {<br \/>\n    &#8220;command&#8221;: &#8220;list&#8221;,<br \/>\n    &#8220;description&#8221;: &#8220;List all subcommands&#8221;,<br \/>\n    &#8220;usage&#8221;: &#8220;Use \/<main command> list&#8221;,<br \/>\n    &#8220;permission&#8221;: &#8220;JsPig.JsExtend.List&#8221;,<br \/>\n    &#8220;permissionMessage&#8221;: &#8220;You do not have permission to use this command.&#8221;<br \/>\n  }<br \/>\n}<br \/>\n&#8220;`<br \/>\n# plugin Commands<\/p>\n<p>permission: JsPig.op<\/p>\n<p>default: op<\/p>\n<p>&#8211; jspig reload<br \/>\n&#8211; jspig load <js><br \/>\n&#8211; jspig unload <js><br \/>\n&#8211; jspig list<br \/>\n&#8211; jspig declare<\/p>\n<p>permission: JsPig.JsExtend<\/p>\n<p>default: default<\/p>\n<p>&#8211; jse <command><\/p>\n<p># Example<br \/>\ngithub<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JsPig provides complete access to the Bukkit API via GraalVM, allowing developers to efficiently create and manage Minecraft plugins using JavaScript&#8217;s flexibility and simplicity.<\/p>\n","protected":false},"featured_media":88603,"template":"","meta":{"_minecraft_slug":"jspig","_minecraft_project_id":"XYXwoJF4","_minecraft_author":"I-Mortals","_minecraft_license":"LicenseRef-All-Rights-Reserved","_minecraft_downloads":88,"_minecraft_follows":2,"_minecraft_client_side":"unsupported","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"jspig.zip","_minecraft_size_bytes":75271833,"_minecraft_version_count":2,"_minecraft_updated_at":"2026-05-15T20:04:31.943884Z","_minecraft_date_created":"2025-02-07T20:44:47.475277Z","_minecraft_date_modified":"2025-03-07T12:27:16.172633Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/jspig","_minecraft_icon_attachment_id":88603,"_minecraft_imported_at":"2026-06-05T01:32:25+00:00","_minecraft_import_hash":"4e84786e5b58031cb99e3bd920b06f17","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[124,844,89,873,126,90,127,129,123,159],"mod_loader":[130,132,134],"minecraft_version":[36],"class_list":["post-88602","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-bukkit","mod_category-economy","mod_category-game-mechanics","mod_category-library","mod_category-management","mod_category-optimization","mod_category-paper","mod_category-spigot","mod_category-technology","mod_category-worldgen","mod_loader-bukkit","mod_loader-paper","mod_loader-spigot","minecraft_version-1-20-1"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JsPig - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JsPig - Minecraft\" \/>\n<meta property=\"og:description\" content=\"JsPig provides complete access to the Bukkit API via GraalVM, allowing developers to efficiently create and manage Minecraft plugins using JavaScript&#039;s flexibility and simplicity.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta property=\"og:image\" content=\"https:\/\/img.shields.io\/badge\/JsPig-package?style=flat-square&link=JsPig\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/jspig\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/jspig\\\/\",\"name\":\"JsPig - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/jspig\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/jspig\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/jspig-icon-7be14605a4a61a90e275f3b13dac1a80c7d1593c_96.webp\",\"datePublished\":\"2026-06-05T01:32:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/jspig\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/jspig\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/jspig\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/jspig-icon-7be14605a4a61a90e275f3b13dac1a80c7d1593c_96.webp\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/jspig-icon-7be14605a4a61a90e275f3b13dac1a80c7d1593c_96.webp\",\"width\":96,\"height\":96},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/jspig\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JsPig\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JsPig - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/","og_locale":"en_US","og_type":"article","og_title":"JsPig - Minecraft","og_description":"JsPig provides complete access to the Bukkit API via GraalVM, allowing developers to efficiently create and manage Minecraft plugins using JavaScript's flexibility and simplicity.","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/","og_site_name":"Minecraft","og_image":[{"url":"https:\/\/img.shields.io\/badge\/JsPig-package?style=flat-square&link=JsPig","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/","name":"JsPig - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/jspig-icon-7be14605a4a61a90e275f3b13dac1a80c7d1593c_96.webp","datePublished":"2026-06-05T01:32:24+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/jspig\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/jspig-icon-7be14605a4a61a90e275f3b13dac1a80c7d1593c_96.webp","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/jspig-icon-7be14605a4a61a90e275f3b13dac1a80c7d1593c_96.webp","width":96,"height":96},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/jspig\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"JsPig"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/88602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/88603"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=88602"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=88602"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=88602"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=88602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}