• 欢迎来到Minecraft插件百科!
  • 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
  • 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289

Citizens/角色/铁匠

来自Minecraft插件百科
Qsefthuopq讨论 | 贡献2018年11月28日 (三) 22:28的版本
跳转至: 导航搜索

文件:Blacksmith.png

Blacksmith


作者 aPunch
版本 ???
Citizens 版本 2.0.x
其它前置 以Vault为前置的经济系统
下载地址 Link
描述: 高度自定义装备锻造

Blacksmith 是 Citizens 2.0 的一个角色特性,可以给予NPC以下能力:

  • 付费修复武器、工具和装备.

Most up-to-date source code available here: https://github.com/mcmonkey4eva/Blacksmith

更新记录

v1.13 10/12/2018

??? ?/?/2017

??? 2/17/2015

  • 更新到最新内容.

v1.3 8/5/2013

  • 修复铁匠不归还物品的漏洞.

v1.2 8/15/2012

  • Added price-per-durability-point option on a per-item basis.
  • dded session timeout if player asks for price and does not reforge item.
  • Fixed Random-enchant algorithm.

v1.1 8/8/2012

  • Compatible with 1.3.1 builds of C2

如何使用

安装

  1. 安装Citizens 2
  2. 将Blacksmith.jar文件放进/plugins文件夹。
  3. 启动服务器。
  4. 创建NPC,然后给予它铁匠特性。

输入

/npc create Smithy --trait blacksmith 

/npc create Smithy
/trait blacksmith 

介绍

Blacksmiths have a variety of settings that can be per-NPC or global. The settings under "defaults" in the configuration file are the default settings that a blacksmith will be given when it is created. You can override these settings by using the commands from the Commands section below. You can even configure which items a blacksmith is able to reforge in-game using commands. By default, a blacksmith is able to reforge all items.

交互

Interacting with a blacksmith is simple:

  • Right click the NPC with a tool or armor in your hand. It will tell you the price that it costs to reforge it.
  • Right click again within 10 seconds and the blacksmith will begin reforging the item.
    • Depending on the configuration, the reforging has a chance to enchant or damage an item.

价格

Prices are determined by the damage of an item, the number and type of enchantments, and the prices defined in the configuration file. Basically, the formula for determining the price of a reforge is basePrice + durabilityRemaining + enchantments.

基础价格

The default base price for a reforge is the base-prices.default value in the configuration file. To add new base prices for each individual item, add the item to the config file under base-prices

耐久度

Durability is the amount of damage that an item has taken. Generally, the more damaged an item is, the cheaper it will be to reforge. Trying to reforge an item with no damage will be significantly more expensive. The price per durability point is price-per-durability-point.default in the configuration. Per-item values may be set by adding to this section.

These are the items names to use with custom base and per-durability-point prices.

Valid Items

wood-pickaxe 木镐
wood-spade 木铲
wood-hoe 木锄
wood-sword 木剑
wood-axe 木斧
stone-pickaxe 石镐
stone-spade 石铲
stone-hoe 石锄
stone-sword 石剑
stone-axe 石斧
gold-pickaxe 金镐
gold-spade 金铲
gold-hoe 金锄
gold-sword 金剑
gold-axe 金斧
iron-pickaxe 铁镐
iron-spade 铁铲
iron-hoe 铁锄
iron-sword 铁剑
iron-axe 铁斧
diamond-pickaxe 钻石镐
diamond-spade
diamond-hoe
diamond-axe
bow
flint-and-steel
fishing-rod
shears
leather-helmet
leather-chestplate
leather-leggings
leather-boots
chainmail-helmet
chainmail-chestplate
chainmail-leggings
chainmail-boots
gold-helmet
gold-chestplate
gold-leggings
gold-boots
iron-helmet
iron-chestplate
iron-leggings
iron-boots
diamond-helmet
diamond-chestplate
diamond-leggings

diamond-boots

示例:

base-prices:
  default: 10
  diamond-sword: 45
price-per-durability-point:
  default: 1
  diamond-sword: 3

附魔

The price of reforging an item with enchantments is more expensive than one without any. For each enchantment, an amount is added to the total price based on the "enchantment-modifier" and the level of the enchantment. Enchantment modifiers can be configured in the configuration file by adding the enchantment name and a value within the enchantment-modifiers section. The default modifier, enchantment-modifiers.default, is used if the enchantment name is not found. Here are valid, case-sensitive names for enchantment modifiers:

  • arrow-damage - Provides extra damage when shooting arrows from bows
  • arrow-fire - Sets entities on fire when hit by arrows shot from a bow
  • arrow-infinite - Provides infinite arrows when shooting a bow
  • arrow-knockback - Provides a knockback when an entity is hit by an arrow from a bow
  • damage-all - Increases damage against all targets
  • damage-arthropods - Increases damage against arthropod targets
  • damage-undead - Increases damage against undead targets
  • dig-speed - Increases the rate at which you mine/dig
  • durability - Decreases the rate at which a tool looses durability
  • fire-aspect - When attacking a target, has a chance to set them on fire
  • knockback - All damage to other targets will knock them back when hit
  • loot-bonus-blocks - Provides a chance of gaining extra loot when destroying blocks
  • loot-bonus-mobs - Provides a chance of gaining extra loot when killing monsters
  • oxygen - Decreases the rate of air loss whilst underwater
  • protection-environmental - Provides protection against environmental damage
  • protection-explosions - Provides protection against explosive damage
  • protection-fall - Provides protection against fall damage
  • protection-fire - Provides protection against fire damage
  • protection-projectile - Provides protection against projectile damage
  • silk-touch - Allows blocks to drop themselves instead of fragments (for example, stone instead of cobblestone)
  • water-worker - Increases the speed at which a player may mine underwater

权限

如果你希望让玩家使用铁匠,你需要给予玩家

  • blacksmith.reforge 权限.

配置

铁匠的配置文件在 /plugins/Blacksmith/config.yml

默认配置

The blacksmith config.yml contains the default settings for new blacksmiths. All of these options can be changed on existing blacksmiths in the Citizens/saves.yml. Mouseover each section to view it's description. All settings under defaults can be overriden by individual blacksmiths in the Citizens 2 saves.yml.

# Blacksmith Configuration
base-prices:
 default: 10
price-per-durability-point:
 default: 1
defaults:
 messages:
   busy-with-player: <c>I'm busy at the moment. Come back later!
   busy-with-reforge: <c>I'm working on it. Be patient!
   cooldown-not-expired: <c>You've already had your chance! Give me a break!
   cost: <e>It will cost <a><price> <e>to reforge that <a><item><e>! Click again to reforge!
   fail-reforge: <c>Whoops! Didn't mean to do that! Maybe next time?
   insufficient-funds: <c>You don't have enough money to reforge that item!
   invalid-item: <c>I'm sorry, but I don't know how to reforge that!
   start-reforge: <e>Ok, let's see what I can do...
   successful-reforge: <a>There you go! All better!
 drop-item: true
 percent-chance-to-fail-reforge: 10
 percent-chance-for-extra-enchantments: 5
 maximum-enchantments: 3
 delays-in-seconds:
   maximum: 30
   minimum: 5
   reforge-cooldown: 60
enchantment-modifiers:
 default: 5