MittelLib
一个包含实用功能的库。
注意:需要 JDK25
功能
- 物品序列化/反序列化
- 物品组件序列化/反序列化(支持几乎所有 Minecraft 组件)
- MiniPlaceholders 和 PlaceholderAPI 的通用占位符扩展
- 来自其他插件的物品与方块(ItemsAdder、Nexo 等)
- 更多功能即将推出...
开发示例
设置物品组件:
ItemStack itemStack = ...;
MittelItem item = MittelItem.fromItemStack(itemStack);
ResolvableProfile component = ...;
ProfileComponent profileComponent = ProfileComponent.fromMinecraftComponent(component);
item.component(profileComponent);
ItemStack edited = item.get();
将物品写入配置文件:
MittelItem mittelItem = ...;
ConfigurationSection itemSection = ...;
mittelItem.write(itemSection);
从配置文件中读取物品:
ConfigurationSection itemSection = ...;
MittelItem item = MittelItem.readFromSection(itemSection);
获取自定义物品:
ItemStack item1 = ContentProviders.getItemStack("nexo:thisexample");
ItemStack item2 = ContentProviders.getItemStack("itemsadder:example:ex");
导入
该构件已发布至 Maven Central!
Maven:
<dependency>
<groupId>io.github.lijinhong11</groupId>
<artifactId>MittelLib</artifactId>
<version>VERSION</version>
<scope>provided</scope>
</dependency>
Gradle (Groovy):
compileOnly 'io.github.lijinhong11:MittelLib:VERSION'
Gradle (Kotlin):
compileOnly("io.github.lijinhong11:MittelLib:VERSION")
你是这个资源的作者?登录后可认领此资源。
相似资源
数据包事件PacketEvents
retrooper
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
前置科技
46
ExyliaLib
ExyliaServices
ExyliaPlugins 的库。
前置实用
26
Vivecraft Spigot Extension
fayer3
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
前置实用
12
WorldEdit
me4502
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
前置管理
10
BentoBox
tastybento
SkyBlock、OneBlock、Boxed、SkyGrid、AcidIsland、CaveBlock、Poseidon、StrangerRealms——以及更多!这些只是由 BentoBox 支持的基于岛屿的游戏模式之一。来自原版 ASkyBlock 的作者。
玩法机制小游戏
10
UltimateAdvancementAPI
frengor
一个强大的 API,用于为你的 Minecraft 服务器创建自定义进度。
前置实用
10
评论 0
登录后参与评分
还没有评论,来抢沙发吧