▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Scriptirc
Scriptirc

Scriptirc

AI write plugins for Bukkit/Spigot/Paper servers. Just put .java file in the folders to load.

563
7

Scriptirc - script compiler, compiles java source code directly into a server plugin and loads it.

This plugin is recommended for test servers or servers under development because the compiled scripts do not need to rely on Scriptirc to load, you can put the compiled plugin scripts directly into plugins.

📚 Introduction

Scriptirc is a powerful Bukkit/Spigot plugin designed to simplify plugin management and on-the-fly development processes. If you've ever wanted to be able to compile and modify script plugins, load, unload or reload them without restarting the server, or want to quickly develop and test simple features, Scriptirc is for you.

✨ Key Features

🔄 Dynamic plugin management - load, unload or reload plugins without restarting the server

📝 On-the-fly script compilation - Compile Java scripts directly into fully functional Bukkit plugins

🛡️ Data Directory Segregation - Automatically creates separate data directories for plugin scripts

🔧 Seamless Integration - Compatible with existing Bukkit/Spigot/Paper environments

🔒 Resource Release - Uninstall plugin scripts to completely release plugin resources, unlock JAR files

🚀 Installation Instructions

Download the corresponding version of Scriptirc.jar

Place the JAR file in the plugins directory of the server

Restart the server or load the plugin using the plugin manager

The plugin will automatically create the necessary directory structure and configuration files

💡 Usage

Scriptirc provides an intuitive command system that allows you to easily manage plugins and scripts:

Basic commands (all commands can be abbreviated as /si)

Command Description

/scriptirc help	
/scriptirc load <pulgin name>	
/scriptirc unload <pulgin name>
/scriptirc reload <pulgin name>
/scriptirc list	
/scriptirc compiler <pulgin name>	
/scriptirc sync
/scriptirc profile

Plugin management example

Load a plugin named TestPlugin.

/si load TestPlugin

Uninstall the plugin

/si unload TestPlugin

Reload the plugin (e.g. after an update)

/si reload TestPlugin

View list of loaded plugins

/si list

Example of script compilation

Compile the HelloWorld.java script located in the script_src directory.

/si compiler HelloWorld

Then load the compiled plugin.

/si load HelloWorld

📂 Directory structure

After installation, Scriptirc will create the following directory structure:

plugins/
  └── Scriptirc/
      ├── config.yml # Plugin configuration file
      ├── plugins/ # External plugin storage directory
      │ └── Data/ # Plugin data directory
      ├─ script_src/ # Script source code directory │ ├── script_src/ # Script source code directory
      │ ├── HelloWorld.java # Example scripts
      │ └── MathUtil.java # Example Scripts
      └─ script_build/ # Temporary script build directory

🛠️ Development Tutorial - Creating Your First Script Plugin

Scriptirc makes plugin development incredibly easy. All you need to do is create a Java source file, compile it and load it for use immediately. Here are the development steps:

1. Create the script file

Create a new Java file in the plugins/Scriptirc/script_src directory, e.g. MyFirstPlugin.java.

2. Write the plugin code

Below is a simple plugin template:

The package name is customizable (just try to make sense)

package your.package.name;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

/**
* @pluginName <Plugin Name>
* @author <author>
* @version <version>
* @description <Description Complete all descriptions in this line only>
* (Commands and permissions are added optionally)
* [command]<command1>|description1[/command] 
* [command]<command2>|description2[/command]
* [Permission]<limit1>|description1[/Permission]
* [Permission]<limit2>|description2[/Permission]
*/

public class MyFirstPlugin extends JavaPlugin {
    
    @Override
    public void onEnable() {
        getLogger().info("Plugin enabled!");
        // Initializing Code
				//
    }
    
    @Override
    public void onDisable() {
        getLogger().info("Plugin disabled!");
        // The code for the unload / listener / command can be placed here.
    }
    
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (command.getName().equalsIgnoreCase("myfirstcmd")) {
            if (sender instanceof Player) {
                Player player = (Player) sender;
                player.sendMessage("§aHello, this is my first plugin command!");
            } else {
                sender.sendMessage("This command can only be executed by the player!");
            }
            return true;
        }
        return false;
    }
}

Official AI is recommended!!! Official Website

3. Compiling and loading your plugin

Use the following commands to compile and load your plugin:

/si compiler MyFirstPlugin
/si load MyFirstPlugin

It's as simple as that! Your plugin is now running on the server, no need to restart the server.

Important metadata fields
|Fields        |Required   |Description
|VERSION       |YES        |Plugin version number
|DESCRIPTION   |YES        |Plugin Description
|AUTHOR        |YES        |Plugin Author
|COMMANDS      |No         |Plugin command definitions in the form of “command name”.
|PERMISSIONS   |No         |Permission definitions in the form of “permission nodes”.

⚙️ Configuration file description

Scriptirc's configuration file (config.yml) allows you to customize the behavior of the plugin:

Plugin auto-reload configuration auto-reload.

Whether to enable auto-reload enabled: true

Check interval (seconds) check-interval: 5

verbose-logging: false verbose-logging: false

Plugin management settings plugin-management.

External plugins directory, relative to the plugin data folder external-plugins-directory: “plugins”

Whether to automatically load external plugins on server startup. load-on-startup: true

Whether to redirect the data folder of external plugins to the Scriptirc directory. redirect-data-folder: true

Permission settings permissions.

Administrator permissions node admin-permission: “scriptirc.admin”

Whether to allow OP use only op-only: true

Logging settings

logging. logging output level: VERBOSE (output all logs), NORMAL (standard output), MINIMAL (output only key information)

level: “MINIMAL” (If you encounter a compilation failure, try switching the logging mode to VERBOSE)

🤔 Frequently Asked Questions

What if the player can't see the commands after loading the plugin? (There is a slight possibility of a bug that will be fixed later)

The server administrator can run the command /si sync to synchronize commands to all online players. Or have players log back into the server.

What should I do if I get an error compiling the script?

Make sure:

Java code is syntactically correct

All required metadata fields (VERSION, DESCRIPTION, AUTHOR) are included.

The server is running on JDK and not JRE (JDK is required for compilation)

How to remove dynamically loaded plugin files?

When unloading a plugin using the /si unload command, Scriptirc tries to completely free the JAR file so that it can be deleted or replaced. If it still cannot be deleted, it may be necessary to restart the server.

Recognize

There is code related to plugin unload loading I refer to the PlugManX project

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

Minecraft: Java Edition

1.21.x1.20.x1.19.x1.18.x1.17.x1.16.x1.15.x1.14.x1.13.x1.12.x

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

Сервер

Создатели

Детали

Лицензия:Apache-2.0
Опубликован:9 месяцев назад
Обновлён:1 месяц назад
Главная