Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_2mgCH6rD.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
LoreEditor - 墨喵 Minecraft 资源
LoreEditor 图标

LoreEditor

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.3.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/loreeditor
资源信息

Minecraft 版本: 1.15.2 1.16.5 1.19.4 1.20.1 1.20.2 1.21.1 1.21.3

平台: paper purpur spigot

标签: library

资源介绍

LoreEditor

Packet-level item lore modification for Spigot and its forks.

⚠️Warning

This plugin only supports versions listed in the Modrinth page. Other versions will NOT work.

Check your server version before downloading the plugin!

✨Features

  • Add lore lines to items, without affecting an actual item.

📥Installation

You can download the latest version of LoreEditor from the Modrinth and then place it in your plugins folder.

🔧Developer API

LoreEditor provides a simple API for developers to use.

💻Dependency

📝plugin.yml

To use LoreEditor in your plugin, you need to add the following to your plugin.yml:

depend: [LoreEditor]
Maven

If you are using Maven, add the following to your <repositories> tag in pom.xml:

<repository>
    <id>azisaba</id>
    <url>https://repo.azisaba.net/repository/maven-public/</url>
</repository>

And add the following to your <dependencies> tag in pom.xml:

<dependency>
    <groupId>net.azisaba.loreeditor</groupId>
    <artifactId>api</artifactId>
    <version>[version]</version>
    <scope>provided</scope>
    <classifier>all</classifier> <!-- don't forget "all" classifier -->
</dependency>
Gradle (Kotlin DSL)
repositories {
    maven("https://repo.azisaba.net/repository/maven-public/")
}

dependencies {
    compileOnly("net.azisaba.loreeditor:api:[version]:all") // don't forget "all" classifier
}

⌨️Usage

Add lore lines
import net.azisaba.loreeditor.api.event.EventBus;
import net.azisaba.loreeditor.api.event.ItemEvent;
import net.azisaba.loreeditor.libs.net.kyori.adventure.text.Component;
import org.bukkit.plugin.java.JavaPlugin;

public class TestPlugin extends JavaPlugin {
    @Override
    public void onEnable() {
        // In LoreEditor, we use EventBus to listen for events.
        // This example adds "Hello, world!" to the lore of the every item.
        // Please note that blocking operations (such as file IO and database operations) should not be performed in the event listener.
        EventBus.INSTANCE.register(this, ItemEvent.class, 0, e -> {
            e.addLore(Component.text("Hello, world!"));
            // more lore lines...
        });
    }

    // we don't need to unregister the listener because LoreEditor will handle it.
}

📜License

LoreEditor is licensed under the GNU General Public License v3.0.

下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
wemmbu's nukes

价格:0 墨喵币
下载量:0

查看详情
Create: Renewable Netherrack

价格:0 墨喵币
下载量:0

查看详情
Beta Blood

价格:0 墨喵币
下载量:0

查看详情
LowKey Blood PVP Pack

价格:0 墨喵币
下载量:0

查看详情