▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/JavaSkript
JavaSkript

JavaSkript

JavaSkript lets you create Paper server plugins using simple .java script files. Make changes instantly without setting up a full development environment or restarting your server.

Оцените первым
25
0

JavaSkript

JavaSkript is a scripting engine for Paper and Folia that lets you write .java scripts with hot-reload and automatic compilation. Perfect for rapid prototyping or learning Java without the complexity of traditional plugin development.

Security Warning

Scripts run with plugin-level access. Review scripts before loading them.

Community Scripts

Looking for ready-to-use scripts? Browse our Community Scripts Repository to discover scripts created by the community. You can also contribute your own scripts to help others!

About JavaSkript

JavaSkript was created to bridge the gap between simple scripting and full plugin development. Unlike traditional plugins that require compilation, IDE setup, and server restarts, JavaSkript allows you to write Java code directly in script files that load instantly. This approach combines the power and flexibility of Java with the convenience of scripting languages.

The project focuses on providing a seamless development experience. Scripts automatically reload when files change, dependencies are downloaded from Maven Central on demand, and commands register dynamically without configuration files.

Features

JavaSkript is packed with powerful features for building both simple and complex server functionality.

Write Java in Script Files - No manual compilation or IDE setup needed. Write Java code in .java files and they compile and load automatically.

Hot Reload - Scripts automatically reload when files change. No server restarts required during development.

Multiple Classes Per File - Organize code with managers, utilities, and data classes all in one file.

Dynamic Maven Dependencies - Use any library from Maven Central. Dependencies download automatically when scripts load.

Full Paper and Folia Support - Works on both platforms with automatic detection. Mark scripts with @FoliaSupport or @PaperOnly annotations.

Dynamic Commands - Commands register automatically without plugin.yml configuration. Tab completion works out of the box.

Dynamic Permissions - LuckPerms-style permission registration. Permissions integrate seamlessly with permission plugins.

Built-in APIs - Scheduler, Config, Database (SQLite with HikariCP), GUI Builder, and PlaceholderAPI support included.

Auto-injection - APIs automatically inject into your scripts. No manual initialization required.

Script Dependencies - Scripts can depend on other scripts for code reuse and organization.

Compilation Caching - Unchanged scripts reload 10-50x faster with intelligent caching.

Parallel Dependency Resolution - Multiple dependencies download simultaneously for faster script loading.

Folder Validation - Enforces proper data storage in the script-data folder to keep your server organized.

High Performance - Scripts compile to native Java bytecode. Performance is identical to traditional plugins.

Example

Creating a custom command with JavaSkript is straightforward. Here is a simple heal command:

import dev.mukulx.javaskript.script.FoliaSupport;
import java.util.List;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.command.*;
import org.bukkit.entity.Player;

@FoliaSupport
public class HealCommand implements CommandExecutor, TabCompleter {

  @Override
  public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
    if (!(sender instanceof Player player)) {
      sender.sendMessage(Component.text("Only players can use this").color(NamedTextColor.RED));
      return true;
    }

    player.setHealth(player.getMaxHealth());
    player.setFoodLevel(20);
    player.sendMessage(Component.text("You have been healed").color(NamedTextColor.GREEN));
    return true;
  }

  @Override
  public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args) {
    return List.of();
  }
}

Save this as HealCommand.java in the scripts folder. The command registers automatically and is ready to use immediately.

Requirements

JavaSkript requires Paper 1.21.1+ or Folia 1.21.1+ to work. Bukkit and Spigot are not supported as they lack the required APIs.

Java 21 or higher is required for both the server and the plugin.

Support is only available for the latest stable versions of Paper, Folia, and JavaSkript. Older versions may work but are not officially supported.

Security Warning

Scripts run with plugin-level access. Review scripts before loading them.

Installation

Download the latest version of JavaSkript by clicking the download button above. Place the downloaded jar file in your server's plugins folder and restart the server. Once loaded, a scripts folder will be created at plugins/JavaSkript/scripts/.

Example scripts are included in the jar file. Copy them from the examples folder to the scripts folder to use them.

Commands

All commands require the javaskript.admin permission (default: op).

  • /javaskript reload [script] - Reload all scripts or a specific script
  • /javaskript list - List all scripts (loaded and disabled)
  • /javaskript load <script> - Load a specific script
  • /javaskript unload <script> - Unload a specific script
  • /javaskript restart <script> - Restart a specific script
  • /javaskript enable <script> - Enable a disabled script
  • /javaskript disable <script> - Disable a script
  • /javaskript info <script> - Show script information

Aliases: /js, /jskript

Having an Issue with JavaSkript?

If you experience unexpected behavior with JavaSkript, you can report it as an issue on our GitHub Repository. Please check the troubleshooting guide before reporting issues. When reporting bugs, include the full error message from console, script code that causes the issue, server version, JavaSkript version, and steps to reproduce.

Resources

Documentation - Complete documentation is available in the docs folder on GitHub. This includes a quick start guide, tutorial, API documentation, and troubleshooting guide.

Examples - Ready-to-use example scripts are included with the plugin. Additional examples are available in the examples folder on GitHub.

Source Code - The complete source code is available on GitHub.

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

26.1.x1.21.x

Платформы

Поддерживаемые окружения

Сервер

Ссылки


Создатели

Детали

Лицензия:
Опубликован:3 недели назад
Обновлён:2 недели назад
Главная