WayOfShadows
Description
此插件提供 6 种类似刺客/盗贼的技能。
背刺、药水效果、抓钩、偷窃和空中刺杀。
您可以将此插件与 SkillLevels 配合使用,使技能可升级和/或在使用技能时奖励经验值。
背刺灵感来自 locutus 的插件 Backstab。
抓钩灵感来自 SalamiJack 的插件 HookShot。
Compatibility
抓钩技能使用了 NMS 代码,以防止用户捡起由插件射出的箭矢。如果您计划使用此功能,则必须使用制作该插件时所基于的 CraftBukkit 版本。
Version 0.5 update notice
在 0.5 版本中,配置文件和权限格式发生了变化。
配置文件将自动更新,但权限需要手动更新。
Metrics
此插件使用了 Hidendra 的插件指标系统。您可以在 <yourPluginFolder>/PluginMetrics/config.yml 中选择退出。
将收集以下信息:
- 唯一标识符
- 服务器的 Java 版本
- 服务器是处于离线模式还是在线模式
- 插件的版本
- 服务器的实现方式和游戏版本
- 操作系统版本/名称和架构
- CPU 的核心数量
- 在线玩家数量
- 指标版本
- 您的在线模式状态
- 您的服务器位置
Skill description
背刺:当您从背后攻击某人时,您有机会造成额外伤害。
效果:当您攻击某人时,您的目标可能会获得某种药水效果(如中毒或失明)。
抓钩:当您右键单击射出箭矢时,您可以使用一个可配置的物品(默认:线)将自己拉向它。如果周围没有可以站立的方块,它将在给定时间内生成一个玻璃方块。
偷窃:当您在另一个玩家身后时,您可以右键点击他,这将打开他的物品栏。
现在您可以尝试通过左键点击他物品栏中的物品来窃取一定价值的物品。
空中刺杀:当您在下落过程中攻击时,您将造成更多伤害,具体取决于您已经下落的距离。
开锁:当您右键点击受保护且您无权访问的方块上的特殊物品时,您仍有机会使用它。
例如,受保护的门或箱子将会打开。
此外,当木门/栅栏门/活板门/拉杆被撬开后,它在定义的一段时间内无法被打开。(除非再次撬开)
Usage
Permissions
- shadow.reload - 访问 /wayofshadows 命令,该命令重新加载插件
- shadow.<skillname> - 允许您使用任何有效物品使用该技能
- shadow.<skillname>.item.<material> - 允许您使用材质为 <material> 的物品使用该技能
- shadow.<skillname>.name.<name> - 允许您使用名称为 <name> 的物品使用该技能
- shadow.<skillname>.lore.<lore> - 允许您使用简介中包含字符串 <lore> 的物品使用该技能
对于偷窃技能:
- shadow.<skillname>.exempt - 拥有此权限的玩家不受此技能影响
Configuration
如果不存在现有的 config.yml,插件将在启动时创建默认配置文件。
其中包含每种技能的示例设置。
您可以添加任意数量的每种技能类型的技能。
所有需要数值的值都可以是数学公式,如果您将插件与 SkillLevels 一起使用。
您可以使用 +, -, *, /, ^, log(), sqrt()。^ 表示指数,例如 x^2 = x*x | log() = 自然对数(底数为 e)| sqrt() = 平方根
如果您正在查找物品/材质名称,请查看此处。
每个技能都具有的通用值:
type - 技能的类型。有效类型为 "backstab", "effect", "grapplinghook", "pickpocket" 和 "airassassination"
lore - 字符串列表,使此技能可与简介中包含这些字符串之一的物品一起使用。
items - 可用于此技能的物品名称(或物品 ID)列表
names - 字符串列表,使此技能可与名称中包含这些字符串的物品一起使用
levelSystem - 等级系统的名称,用于
cooldown - 一个数字,定义此技能的冷却时间(秒)
cooldownMsg - 当玩家尝试在冷却期间使用此技能时显示给玩家的字符串。%time% 将被替换为秒数。
背刺值
chance - 一个数字,定义成功使用此技能的机会,必须在 0 到 1 之间
critChance - 一个数字,定义造成暴击的机会,必须在 0 到 1 之间
multiplier - 一个数字,在成功背刺的情况下用于乘以伤害
critMultiplier - 一个数字,在成功暴击背刺的情况下用于乘以伤害
maxAngle - 一个数字,确定您可以站在目标身后的最大角度(度)
onSneak - 一个布尔值,表示是否需要潜行才能使用此技能
critOnSneak - 一个布尔值,表示是否需要潜行才能造成暴击
attackerMsg - 成功背刺后攻击者收到的消息
critMsg - 攻击者在成功背刺时收到的消息
victimMsg - 受害者在被成功背刺时收到的消息
效果值
effectType - 药水效果类型,用于此技能。可以是 ID 或名称。
chance - 一个数字,定义成功使用该技能的概率,必须在 0 到 1 之间
maxAngle - 一个数字,确定你可以站在目标身后的最大角度(以度为单位)
duration - 一个数字,定义药水效果的持续时间
strength - 一个数字,定义药水效果的强度
钩子值
pullLore - 字符串列表,如果物品的lore中包含这些字符串之一,则定义为可拉动物品
pullItems - 物品名称(或物品 ID)列表,可作为拉动物品使用
pullNames - 字符串列表,如果物品名称在此列表中给出,则定义为可拉动物品
blockTime - 一个数字,决定生成的玻璃方块在服务端刻中的存活时间(1 = 1/20 秒)
maxDistance - 一个数字,定义与钩子的最大距离
distanceToInitial - 一个数字,定义与你初始位置的最大距离
itemsPerBlock - 每单位距离消耗的物品数量
distanceMsg - 当玩家的钩子太远时,玩家收到的消息
initialMsg - 当玩家距离初始位置太远时,玩家收到的消息
errorMsg - 当玩家尝试钩向无效位置时,玩家收到的消息
canPickupArrow - 布尔值,表示玩家是否可以拾取自己的钩箭
空中刺杀
chance - 一个数字,定义成功使用该技能的概率,必须在 0 到 1 之间
minHeight - 激活此技能所需的最小高度。该数字将从坠落距离中减去
maxHeight - 获得伤害加成的最大高度。
damgePerHeight - 每单位坠落距离添加到攻击的伤害量
negateFallOnSuccess - 当成功执行此技能时,是否将坠落伤害设置为 0
attackerMsg - 攻击者在成功执行空中刺杀时收到的消息(若为空则无消息)
victimMsg - 受害者在被成功进行空中刺杀时收到的消息(若为空则无消息)
扒窃值
chance - 一个数字,定义成功使用该技能的概率,必须在 0 到 1 之间
maxAngle - 一个数字,确定你可以站在目标身后的最大角度(以度为单位)
maxDistance - 一个数字,定义与被偷窃玩家的最大距离
maxValue - 每次扒窃会话中可偷窃物品的最大价值
onSneak - 布尔值,表示是否需要潜行才能使用此技能
abortOnDamage - 当偷窃玩家受到伤害时,是否应取消偷窃过程
maxValueMsg - 当偷窃者达到其 maxValue 上限时,偷窃者收到的消息。
cantStealMsg - 当物品不可偷窃时,偷窃者收到的消息
valueCatalogue - 应由此插件使用的 valueCatalogue 的名称。ValueCatalogues 将在下方解释
stealFailedMsg - 当偷窃者未能偷窃物品时,偷窃者收到的消息(若为空则无消息)
attemptStealMsg - 当小偷未能偷窃物品时,受害者收到的消息(若为空则无消息)
开锁值
chance - 一个数字,定义成功使用该技能的概率,必须在 0 到 1 之间。变量 'y' 定义了 "pickable" 部分中定义的撬锁模组
closeCooldown - 一个数字,定义在成功开锁后,门等物体在多长时间内(秒)无法被打开
damageOnFail - 一个数字,定义玩家在开锁失败时受到的伤害量
loseItemOnFail - 布尔值,表示在开锁失败时是否会丢失物品
loseItemOnFail - 布尔值,表示在开锁成功时是否会丢失物品
successMsg - 玩家在成功开锁时收到的消息
failMsg - 玩家在开锁失败时收到的消息
sneakMsg - 玩家在潜行时尝试开锁时收到的消息(-> 原版行为,潜行时你不会打开东西)
closeCooldownMsg - 当你尝试关闭/打开已开锁的门时显示的消息
pickable - 将每个可开锁物品映射到一个修饰符,可用于公式。
价值目录
所有价值目录均在 values.yml 中定义。
数值是累加的。如果你有一个物品,其名称和材质都匹配,两个数值将相加。
价值低于 0 的物品是不可偷窃的。如果你希望某些物品不可偷窃,请赋予它们较高的负值。
<nameofcatalogue>:
defaultValue: -1
items:
<material>: <value>
lore:
<lore>: <value>
names:
<name>: <value>
enchantments:
<enchantment>:
<level>: <value>
事件和技能等级
当某个技能成功激活时,插件会触发相应的事件。(ShadowAirAssassinEvent、ShadowBackStabEvent、ShadowEffectSkillEvent、ShadowPickPocketEvent 和 ShadowPullEvent)
此外,该插件支持 SkillLevels,允许你在技能成功激活时给予经验值奖励。只需在等级系统的配置文件的 CUSTOM 部分添加 "shadow_<技能名称>: <经验值>" 即可。每次成功使用技能都会获得相应的经验值。
源码
本插件为开源项目。其代码可在 GitHub 上找到。

WayOfShadows
Description
This plugin provides 6 assassin/rouge like skills.
Backstab, PotionEffects, GrapplingHook, PickPocket and AirAssassination
You can use this plugin together with SkillLevels to make the skills levelable and/or to reward XP for using the skills.
Backstab is inspired from locutus's plugin Backstab.
Grappling Hook is inspired from SalamiJack's plugin HookShot.
Compatibility
The GrapplingHook Skill uses NMS code, to prevent users from picking up arrows, shot by the plugin. If you plan to use this functionallity, you must use a CraftBukkit version, the plugin was made for.
Version 0.5 update notice
With Version 0.5 the config and permissions format changes.
The config will be updated automaticly, the permissions however needs to be updated by hand.
Metrics
This plugin utilises Hidendra's plugin metrics system. You can opt-out under <yourPluginFolder>/PluginMetrics/config.yml
The following informations will be collected:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's implementation and game version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
- Your online-mode
- Your server location
Skill description
Backstab: When you attack someone from behind you'll get a chance to do extra damage.
Effect: When you attack someone, your target may gets a certain potion effect (like poison or blindness).
Grappling Hook: When you throw a Arrow by rightclick, you can pull you to it with a configurable item (default: String). If there is no block where you could stand on, it`ll spawn a glass block for a given amount of time.
Pickpocket: When you are behind another player, you can right click him, which opens his inventory.
Now you can try to steal a certain worth of items by left clicking the items in his inventory.
AirAssassination: When you attack a while falling down you'll deal more damage, depending on the distance you already fall.
LockPick: When you rightclick with a special item on a protected block, you have no right's for, you have a chance to use it anyways.
E.g. protected doors or chests will open.
Also, when a wooden door/fence gate/trap door/lever gets picked, it can't be opened for a defined amount of time. (Except by picking it again)
Usage
Permissions
- shadow.reload - access to /wayofshadows command, which reloads the plugin
- shadow.<skillname> - allows you to use this skill with every valid item
- shadow.<skillname>.item.<material> - allows you to use this skill with items with material <material>
- shadow.<skillname>.name.<name> - allows you to use this skill with items with name <name>
- shadow.<skillname>.lore.<lore> - allows you to use the skill with items which lore contains the String <lore>
For PickPocket skills:
- shadow.<skillname>.exempt - player with this permission are safe from this skill
Configuration
The plugin creates a default configuration on startup, if there is no existing config.yml.
It contains example setting for every skill.
You can add as many skills of every skill type as you want.
All values which require a number, can be a math forumla as well, if you use the plugin together with SkillLevels.
You can use + ,- ,* ,/ ,^ ,log(), sqrt(). ^ is expotential, like x^2 = x*x | log() = natural logarithm (base e) | sqrt() = sqare root
If you look for item/material names here.
General values, which every skill has:
type - the type of the skill. Valid types are "backstab", "effect", "grapplinghook", "pickpocket" and "airassassination"
lore - list of strings, which make this skill useable with items, that have one if these string within their lore.
items - list of item names (or item ids), which can be used for this skill
names - list of strings, which make this skill usable with items, that have these strings as name
levelSystem - name of the level system, which
cooldown - a number, which defines the cooldown of this skill in seconds
cooldownMsg - the string given to the player, when he tries to use this skill while is on cooldown. %time% will be replaced with the time in seconds.
Backstab values
chance - a number, which defines the chance of using this skill successful, must be between 0 and 1
critChance - a number, which defines the chance landing a critical hit, must be between 0 and 1
multiplier - a number, with which the damage get multiplied in case of a successful backstab
critMultiplier - a number, with which the damage get multiplied in case of a successful critical backstab
maxAngle - a number, which determines the maximum Angle, you can stand behind a target, in degree
onSneak - a boolean whether you need to sneak for this skill or not
critOnSneak - a boolean whether you need to sneak for a critical hit or not
attackerMsg - the message the attacker gets on a successful backstab
critMsg - the message the attacker gets on a critical backstab
victimMsg - the message the victim gets on a successful backstab
Effect values
effectType - the potioneffect type, which is used for this skill. Can be id and name.
chance - a number, which defines the chance of using this skill successful, must be between 0 and 1
maxAngle - a number, which determines the maximum Angle, you can stand behind a target, in degree
duration - a number, which defines the duration of the potion effect
strength - a number, which defines the strength of the potion effect
Hook values
pullLore - list of strings, which defines pull items if they contain one of these strings in their lore
pullItems - list of item names (or item ids), which can be used as pull items
pullNames - list of strings, which defines pull items if their name is given in this list
blockTime - a number, which determines the lifetime of the spawned glass block in server ticks (1 = 1/20 second)
maxDistance - a number, which defines the max distance to the hook
distanceToInitial - a number, which defines the max distance to your initial position
itemsPerBlock - the amount of items of per block distance, which will be consumed
distanceMsg - the message the player gets, when his hook is too far away
initialMsg - the message the player gets, when he is too far away from this initial position
errorMsg - the message the player gets, when he tries to hook to an invalid position
canPickupArrow - a boolean wether a player can pickup his hook arrow or not
AirAssassination
chance - a number, which defines the chance of using this skill successful, must be between 0 and 1
minHeight - the minimum height, required to activate this skill. This number will be substraced from the fall distance
maxHeight - the maximum height, for which you can get the damage bonus.
damgePerHeight - the amount of damage, that will be added to the attack per block fall distance
negateFallOnSuccess - whether the fall damage should be set to 0, when you successfully perform this skill
attackerMsg - the message the attacker gets on a successful air assassination (no message if empty)
victimMsg - the message the victim gets on a successful air assassination (no message if empty)
Pickpocket values
chance - a number, which defines the chance of using this skill successful, must be between 0 and 1
maxAngle - a number, which determines the maximum Angle, you can stand behind a target, in degree
maxDistance - a number, which defines the max distance to the player you are stealing from
maxValue - maximum worth of items you can steal per stealing session
onSneak - a boolean whether you need to sneak for this skill or not
abortOnDamage - whether the stealing process should be cancled if the stealing player gets damage
maxValueMsg - the message the stealer gets, when he reached his maxValue cap.
cantStealMsg - the message the stealer gets, when the item is not stealable
valueCatalogue - the name of the valueCatalogue, which should be used by this plugin. ValueCatalogues are explained below
stealFailedMsg - the message the stealer gets, when he failed to steal an item (no message if empty)
attemptStealMsg - the message the victim gets, when a thief failed to steal an item (no message if empty)
Lockpick values
chance - a number, which defines the chance of using this skill successful, must be between 0 and 1. The variable 'y' defines the pick mod, defined in the "pickable" section
closeCooldown - a number, which defines how long doors/etc. can't be opened after a successful pick in seconds
damageOnFail - a number, which defines how much damage a player gets when he fails to pick a lock
loseItemOnFail - a boolean whether you lose your item when you fail to pick a lock
loseItemOnFail - a boolean whether you lose your item when you succed to pick a lock
successMsg - the message a player gets, when he successfully picks a lock
failMsg - the message a player gets, when he fails to pick a lock
sneakMsg - the message a player gets, when he tries to pick locks while sneaking (-> Vanilla behaviour, you don't open thinks while sneaking)
closeCooldownMsg - the message when you try to close/open a picked door
pickable - maps every pickable item to a modificator, which can be used in formulas.
ValueCatalogue
All value catalogues are define in the values.yml.
The values are additive. If you have a item, which matches in name and material, both values will be added together.
Items with values below 0 are not stealable. If you want items to be not stealable, give them a high negative value.
<nameofcatalogue>:
defaultValue: -1
items:
<material>: <value>
lore:
<lore>: <value>
names:
<name>: <value>
enchantments:
<enchantment>:
<level>: <value>
Events and SkillLevels
The plugin calls events, when an skill is successfully activated. (ShadowAirAssassinEvent, ShadowBackStabEvent, ShadowEffectSkillEvent, ShadowPickPocketEvent and ShadowPullEvent)
Also, the plugin provides support for SkillLevels, what allows you to reward xp for successfull skill activation.
Just add "shadow_<skillname>: <xp>" under the CUSTOM section of your level system's config. Xp are awarded per successful skill usage.
Source
This plugin is open Source. It's code can be found on GitHub

评论 0
登录后参与评分
还没有评论,来抢沙发吧