LegacyCraft – 旧工艺的回归
? 描述
LegacyCraft 将 Minecraft 早期时代的怀旧感带回现代服务器!体验来自过去 Minecraft 版本(从 Alpha 时代到 Release 1.7)的经典、已丢失或已被遗忘的机制、配方和游戏系统。
这款插件是对 Minecraft 根源的致敬,在那个时代,每个方块都有其意义,每种机制都需要被探索。非常适合寻求唤起怀旧情怀的生存服务器、具有历史主题的角色扮演服务器,或计划独特挑战的内容创作者。
✨ 核心功能
?️ 时代系统
- 玩家可以在不同的 Minecraft 时代之间切换(Alpha、Beta、Release 1.0、Release 1.7)
- 每个时代都会施加特定的物品和机制限制
- 可配置为全服范围或按玩家单独配置
?️ 经典配方
- 金苹果:由 8 个金块合成
- 复古火焰弹:由煤炭和烈焰粉制成
- 传承 TNT:爆炸威力比老版本中更高
? 历史工作台
- 针对不同时代的特殊合成台
- 每个工作台都强制执行符合该时代的合成规则
- 自定义 GUI 提供原汁原味的体验
⚙️ 复古机制
- 僵尸可以像早期的 Minecraft 一样破坏门
- 特定时代的战斗机制
- 根据当前激活的时代,存在各种物品/方块限制
? 命令
命令 描述
/legacycraft 显示插件信息
/legacycraft help 显示帮助菜单
/legacycraft epoch <epoch> 更改你当前的时代
/legacycraft epoch list 显示可用的时代
/legacycraft bench <type> 打开一个传承工作台
/legacycraft reload 重载插件配置(仅限管理员)
? 安装
- 下载 LegacyCraft 的最新版本
- 将 .jar 文件放入服务器的 plugins 文件夹中
- 重启服务器
- 通过 config.yml 配置插件
- 享受早期 Minecraft 版本的怀旧感!
⚙️ 配置
插件完全可通过 config.yml 文件进行配置:
# 启用/禁用时代系统
epochSystem:
enabled: true
# 可用时代
epochs:
alpha:
description: "Alpha 时代 – Minecraft 的开端(Beta 之前)"
beta:
description: "Beta 时代 – 正式发行之前"
# 更多时代...
# 传承机制
legacyMechanics:
doorBreaking:
enabled: true
chance: 15 # 僵尸尝试破坏门的概率百分比
time: 60 # 破坏门所需的刻数(20 刻 = 1 秒)
# 更多机制...
? 玩家体验
作为玩家,你可以:
- 使用 /legacycraft epoch list 查看可用时代
- 使用 /legacycraft epoch <epoch> 切换你的当前时代
- 使用 /legacycraft bench <type> 打开历史工作台
- 制作旧配方并重温被遗忘的机制
- 在使用现代服务器功能的同时,享受早期 Minecraft 的怀旧感
? 服务器管理员提示
- 为不同的世界或区域使用不同的时代
- 创建基于时代的任务或挑战
- 与经济类插件结合,构建独特的经济系统
- 举办带有时代转换的特殊活动
? 权限
legacycraft.use 允许使用基本的 LegacyCraft 命令
legacycraft.admin 允许使用管理员级别的 LegacyCraft 命令
?️ 兼容性
- 支持的 Minecraft 版本:1.18-1.21+
- 服务器软件:Spigot, Bukkit, Paper
- 推荐插件:经济类插件、任务插件、权限系统
? 开发者 API
LegacyCraft 提供了一个易于使用的 API,用于与其他插件集成:
LegacyCraft api = (LegacyCraft) Bukkit.getPluginManager().getPlugin("LegacyCraft");
String playerEpoch = api.getPlayerEpoch(player);
? 关于作者
LegacyCraft 诞生于对 Minecraft 历史的深厚热爱。作为长期玩家,我们见证了游戏从其 Alpha 开端发展到今天的全过程——而现在,我们希望与社区分享这段旅程。
? 未来功能
- 特定时代的音效
- 用于原汁原味体验的老版材质包
- 传承任务系统
- 自动时代转换的时间旅行事件
- 社区驱动的老机制扩展
LegacyCraft – 连接 Minecraft 过去与现在的桥梁。
LegacyCraft – API 文档
本文档描述了 LegacyCraft 插件的公共 API,其他插件可以使用它。
概述
LegacyCraft 插件提供了一个 API,允许其他插件:
- 查询和更改玩家的 epoch
- 检查某个物品在特定 epoch 中是否可用
- 打开传承工作台
- 响应与插件相关的事件
API 访问
要访问 LegacyCraft API,你必须首先获取对该插件的引用:
LegacyCraft api = (LegacyCraft) Bukkit.getPluginManager().getPlugin("LegacyCraft");
确保在你的 plugin.yml 中将 LegacyCraft 声明为依赖项:
depend: [LegacyCraft]
# 或者
softdepend: [LegacyCraft]
集成示例
以下是一个如何在你的插件中使用 LegacyCraft API 的简单示例:
public class MyPlugin extends JavaPlugin {
private LegacyCraft legacyCraftAPI;
@Override
public void onEnable() {
// 检查 LegacyCraft 是否可用
Plugin plugin = Bukkit.getPluginManager().getPlugin("LegacyCraft");
if (plugin instanceof LegacyCraft) {
legacyCraftAPI = (LegacyCraft) plugin;
getLogger().info("LegacyCraft API 成功挂钩!");
} else {
getLogger().warning("未找到 LegacyCraft!");
}
// 注册命令和事件
getCommand("mycommand").setExecutor(new MyCommand(this));
getServer().getPluginManager().registerEvents(new MyListener(this), this);
}
public LegacyCraft getLegacyCraftAPI() {
return legacyCraftAPI;
}
}
API 方法
Epoch 管理
/**
* 返回玩家当前的纪元
* @param player 玩家
* @return 当前纪元,如果未设置则返回 "modern"(现代)
*/
public String getPlayerEpoch(Player player) {
return playerEpochs.getOrDefault(player.getUniqueId(), "modern");
}
/**
* 设置玩家的纪元
* @param player 玩家
* @param epoch 要设置的纪元
* @return 如果纪元设置成功则返回 true
*/
public boolean setPlayerEpoch(Player player, String epoch) {
if (epoch.equals("modern") || availableEpochs.contains(epoch)) {
playerEpochs.put(player.getUniqueId(), epoch);
return true;
}
return false;
}
/**
* 返回所有可用的纪元
* @return 包含所有可用纪元的列表
*/
public List<String> getAvailableEpochs() {
return new ArrayList<>(availableEpochs);
}
物品兼容性
/**
* 检查某个材质是否来自比指定纪元更新的版本
* @param material 要检查的材质
* @param epoch 纪元
* @return 如果该材质在指定纪元中不可用,则返回 true
*/
public boolean isItemFromNewerVersion(Material material, String epoch) {
// 插件内部的实现
}
旧版工作台
/**
* 为玩家打开一个旧版工作台
* @param player 玩家
* @param benchType 工作台类型(alpha、beta、release)
* @return 如果工作台成功打开则返回 true
*/
public boolean openLegacyWorkbench(Player player, String benchType) {
if (legacyWorkbenches.containsKey(benchType)) {
player.openInventory(legacyWorkbenches.get(benchType));
return true;
}
return false;
}
/**
* 返回所有可用的旧版工作台类型
* @return 包含所有可用工作台类型的集合
*/
public Set<String> getAvailableWorkbenches() {
return legacyWorkbenches.keySet();
}
事件
LegacyCraft 提供了自定义事件,供其他插件监听:
LegacyEpochChangeEvent
当玩家更改其纪元时触发。
public class LegacyEpochChangeEvent extends PlayerEvent implements Cancellable {
private final String oldEpoch;
private String newEpoch;
private boolean cancelled;
// 构造函数和 getter/setter
}
使用示例:
@EventHandler
public void onEpochChange(LegacyEpochChangeEvent event) {
Player player = event.getPlayer();
String oldEpoch = event.getOldEpoch();
String newEpoch = event.getNewEpoch();
player.sendMessage("您正在从 " + oldEpoch + " 切换到 " + newEpoch + "!");
// 如果玩家无权切换,则取消事件
if (newEpoch.equals("alpha") && !player.hasPermission("myserver.epoch.alpha")) {
event.setCancelled(true);
player.sendMessage("您没有权限进入 Alpha 纪元!");
}
}
LegacyWorkbenchOpenEvent
当玩家打开旧版工作台时触发。
public class LegacyWorkbenchOpenEvent extends PlayerEvent implements Cancellable {
private final String benchType;
private boolean cancelled;
// 构造函数和 getter/setter
}
配置访问
/**
* 获取特定纪元的 ConfigurationSection
* @param epoch 纪元
* @return 该纪元的 ConfigurationSection,如果未找到则返回 null
*/
public ConfigurationSection getEpochConfig(String epoch) {
return getConfig().getConfigurationSection("epochSystem.epochs." + epoch);
}
最佳实践
- 在使用 API 之前,请始终检查 LegacyCraft 是否可用。
- 如果您的插件在没有 LegacyCraft 的情况下也能工作,请使用
softdepend 而不是 depend。
- 在你的机制中尊重玩家选择的纪元。
- 监听 LegacyCraft 的事件以保持与更改同步。
集成示例:经济插件
@EventHandler
public void onEpochChange(LegacyEpochChangeEvent event) {
Player player = event.getPlayer();
String newEpoch = event.getNewEpoch();
// 根据纪元调整货币
if (newEpoch.equals("alpha")) {
switchCurrency(player, Currency.GOLD_NUGGET);
} else if (newEpoch.equals("beta")) {
switchCurrency(player, Currency.GOLD_INGOT);
} else {
switchCurrency(player, Currency.EMERALD);
}
}
集成示例:任务插件
@EventHandler
public void onLegacyWorkbenchOpen(LegacyWorkbenchOpenEvent event) {
Player player = event.getPlayer();
String benchType = event.getBenchType();
// 更新任务进度
if (benchType.equals("alpha")) {
questManager.progressQuest(player, "discover_alpha_crafting");
}
}
联系与支持
如果您对 API 有任何疑问或需要帮助将其集成到您的插件中,欢迎联系我们:
LegacyCraft – The Return of Old Craftsmanship
? Description
LegacyCraft brings the nostalgia of Minecraft’s early days back to modern servers! Experience classic, lost, or forgotten mechanics, recipes, and game systems from past Minecraft versions – from the Alpha age to Release 1.7.
This plugin is a homage to Minecraft’s roots, when every block had meaning and each mechanic had to be discovered. Perfect for survival servers seeking to evoke nostalgia, roleplay servers with historical themes, or content creators planning unique challenges.
✨ Core Features
?️ Epoch System
- Players can switch between various Minecraft eras (Alpha, Beta, Release 1.0, Release 1.7)
- Each era enforces specific item and mechanic restrictions
- Configurable server-wide or per player
?️ Classic Recipes
- Golden Apples: Crafted with 8 gold blocks
- Vintage Fire Charges: Made with coal and blaze powder
- Legacy TNT: Higher explosion power like in older versions
? Historical Workbenches
- Special crafting tables for different eras
- Each workbench enforces era-accurate crafting rules
- Custom GUI for an authentic experience
⚙️ Vintage Mechanics
- Zombies can break doors, like in early Minecraft
- Era-specific combat mechanics
- Various item/block restrictions depending on the active epoch
? Commands
Command Description
/legacycraft Shows plugin information
/legacycraft help Displays help menu
/legacycraft epoch <epoch> Changes your current epoch
/legacycraft epoch list Shows available epochs
/legacycraft bench <type> Opens a legacy workbench
/legacycraft reload Reloads plugin configuration (admin only)
? Installation
- Download the latest version of LegacyCraft
- Place the .jar file in your server’s plugins folder
- Restart your server
- Configure the plugin via config.yml
- Enjoy the nostalgia of early Minecraft versions!
⚙️ Configuration
The plugin is fully configurable via the config.yml file:
# Enable/disable the epoch system
epochSystem:
enabled: true
# Available epochs
epochs:
alpha:
description: "Alpha Era – the beginning of Minecraft (pre-Beta)"
beta:
description: "Beta Era – before the official release"
# more epochs...
# Legacy Mechanics
legacyMechanics:
doorBreaking:
enabled: true
chance: 15 # Percentage chance a zombie will try to break a door
time: 60 # Ticks required to break a door (20 ticks = 1 second)
# more mechanics...
? Player Experience
As a player, you can:
- View available epochs with /legacycraft epoch list
- Switch your current epoch with /legacycraft epoch <epoch>
- Open historical crafting benches with /legacycraft bench <type>
- Craft old recipes and relive forgotten mechanics
- Enjoy early Minecraft nostalgia while still using modern server features
? Server Admin Tips
- Use different epochs for different worlds or regions
- Create epoch-based quests or challenges
- Combine with economy plugins for a unique economic system
- Host special events with shifting eras
? Permissions
legacycraft.use Allows use of basic LegacyCraft commands
legacycraft.admin Allows use of admin-level LegacyCraft commands
?️ Compatibility
- Supported Minecraft versions: 1.18-1.21+
- Server software: Spigot, Bukkit, Paper
- Recommended plugins: Economy plugins, Quests, Permissions systems
? Developer API
LegacyCraft offers an easy-to-use API for integration with other plugins:
LegacyCraft api = (LegacyCraft) Bukkit.getPluginManager().getPlugin("LegacyCraft");
String playerEpoch = api.getPlayerEpoch(player);
? About the Author
LegacyCraft was born from a deep love for Minecraft’s history. As longtime players, we’ve witnessed the game’s evolution from its Alpha beginnings to the present day – and now we want to share that journey with the community.
? Future Features
- Era-specific sound effects
- Old texture packs for an authentic feel
- Legacy quest system
- Time-travel events with automatic epoch shifts
- Community-driven expansions of old mechanics
LegacyCraft – A bridge between Minecraft’s past and present.
LegacyCraft – API Documentation
This documentation describes the public API of the LegacyCraft plugin, which can be used by other plugins.
Overview
The LegacyCraft plugin provides an API that allows other plugins to:
- Query and change a player's epoch
- Check if an item is available in a specific epoch
- Open legacy crafting benches
- React to events related to the plugin
API Access
To access the LegacyCraft API, you must first obtain a reference to the plugin:
LegacyCraft api = (LegacyCraft) Bukkit.getPluginManager().getPlugin("LegacyCraft");
Make sure to declare LegacyCraft as a dependency in your plugin.yml:
depend: [LegacyCraft]
# OR
softdepend: [LegacyCraft]
Example Integration
Here is a simple example of how you might use the LegacyCraft API in your plugin:
public class MyPlugin extends JavaPlugin {
private LegacyCraft legacyCraftAPI;
@Override
public void onEnable() {
// Check if LegacyCraft is available
Plugin plugin = Bukkit.getPluginManager().getPlugin("LegacyCraft");
if (plugin instanceof LegacyCraft) {
legacyCraftAPI = (LegacyCraft) plugin;
getLogger().info("LegacyCraft API successfully hooked!");
} else {
getLogger().warning("LegacyCraft not found!");
}
// Register commands and events
getCommand("mycommand").setExecutor(new MyCommand(this));
getServer().getPluginManager().registerEvents(new MyListener(this), this);
}
public LegacyCraft getLegacyCraftAPI() {
return legacyCraftAPI;
}
}
API Methods
Epoch Management
/**
* Returns the current epoch of a player
* @param player The player
* @return The current epoch or "modern" if none is set
*/
public String getPlayerEpoch(Player player) {
return playerEpochs.getOrDefault(player.getUniqueId(), "modern");
}
/**
* Sets a player's epoch
* @param player The player
* @param epoch The epoch to set
* @return true if the epoch was set successfully
*/
public boolean setPlayerEpoch(Player player, String epoch) {
if (epoch.equals("modern") || availableEpochs.contains(epoch)) {
playerEpochs.put(player.getUniqueId(), epoch);
return true;
}
return false;
}
/**
* Returns all available epochs
* @return A list of all available epochs
*/
public List<String> getAvailableEpochs() {
return new ArrayList<>(availableEpochs);
}
Item Compatibility
/**
* Checks whether a material is from a newer version than the specified epoch
* @param material The material to check
* @param epoch The epoch
* @return true if the material is not available in the specified epoch
*/
public boolean isItemFromNewerVersion(Material material, String epoch) {
// Implementation within the plugin
}
Legacy Workbenches
/**
* Opens a legacy workbench for a player
* @param player The player
* @param benchType The type of workbench (alpha, beta, release)
* @return true if the workbench was opened successfully
*/
public boolean openLegacyWorkbench(Player player, String benchType) {
if (legacyWorkbenches.containsKey(benchType)) {
player.openInventory(legacyWorkbenches.get(benchType));
return true;
}
return false;
}
/**
* Returns all available legacy workbench types
* @return A set of all available workbench types
*/
public Set<String> getAvailableWorkbenches() {
return legacyWorkbenches.keySet();
}
Events
LegacyCraft provides custom events that other plugins can listen to:
LegacyEpochChangeEvent
Triggered when a player changes their epoch.
public class LegacyEpochChangeEvent extends PlayerEvent implements Cancellable {
private final String oldEpoch;
private String newEpoch;
private boolean cancelled;
// Constructor and getter/setter
}
Usage Example:
@EventHandler
public void onEpochChange(LegacyEpochChangeEvent event) {
Player player = event.getPlayer();
String oldEpoch = event.getOldEpoch();
String newEpoch = event.getNewEpoch();
player.sendMessage("You are switching from " + oldEpoch + " to " + newEpoch + "!");
// Cancel the event if the player is not allowed to switch
if (newEpoch.equals("alpha") && !player.hasPermission("myserver.epoch.alpha")) {
event.setCancelled(true);
player.sendMessage("You do not have permission to enter the Alpha epoch!");
}
}
LegacyWorkbenchOpenEvent
Triggered when a player opens a legacy workbench.
public class LegacyWorkbenchOpenEvent extends PlayerEvent implements Cancellable {
private final String benchType;
private boolean cancelled;
// Constructor and getter/setter
}
Configuration Access
/**
* Returns a ConfigurationSection for a specific epoch
* @param epoch The epoch
* @return ConfigurationSection for the epoch or null if not found
*/
public ConfigurationSection getEpochConfig(String epoch) {
return getConfig().getConfigurationSection("epochSystem.epochs." + epoch);
}
Best Practices
- Always check if LegacyCraft is available before using the API.
- Use
softdepend instead of depend if your plugin should work without LegacyCraft.
- Respect the player’s chosen epoch in your mechanics.
- Listen to LegacyCraft events to stay in sync with changes.
Example Integration: Economy Plugin
@EventHandler
public void onEpochChange(LegacyEpochChangeEvent event) {
Player player = event.getPlayer();
String newEpoch = event.getNewEpoch();
// Adjust currency according to epoch
if (newEpoch.equals("alpha")) {
switchCurrency(player, Currency.GOLD_NUGGET);
} else if (newEpoch.equals("beta")) {
switchCurrency(player, Currency.GOLD_INGOT);
} else {
switchCurrency(player, Currency.EMERALD);
}
}
Example Integration: Quest Plugin
@EventHandler
public void onLegacyWorkbenchOpen(LegacyWorkbenchOpenEvent event) {
Player player = event.getPlayer();
String benchType = event.getBenchType();
// Update quest progress
if (benchType.equals("alpha")) {
questManager.progressQuest(player, "discover_alpha_crafting");
}
}
Contact & Support
If you have any questions about the API or need help integrating it into your plugin, feel free to contact us:
评论 0
登录后参与评分
还没有评论,来抢沙发吧