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

EliteMobs/Spigot元数据:修订间差异

来自Minecraft插件百科
跳转到导航 跳转到搜索
(创建页面,内容为“Nearly everything related to EliteMob custom data in the plugin is handled using metadata stored on Minecraft entities. This makes hijacking and injecting Elitemobs...”)
 
无编辑摘要
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
Nearly everything related to EliteMob custom data in the plugin is handled using metadata stored on Minecraft entities.
{{模板:ELBox}}
几乎所有有关EliteMob存储Minecraft实体的自定义数据都已经用元数据处理 .


This makes hijacking and injecting Elitemobs listeners exceedingly easy for people with basic spigot Spigot making skills.
这使得具有基本的插件制作技巧的人能够非常容易地劫持和注入监听器.


I have attempted to compile all existing metadata in the same class (MetadataHandler) which will naturally be updated as the development continues.
我已经尝试过在同一个class内编译所有现有元数据(MetadataHandler) .
=使用EliteMobs的元数据=
=使用EliteMobs的元数据=
EliteMobs uses a few Metadata types. Before attempting to mess with the metadata, I recommend you search the code to see how it is used. As an example, simply adding Metadata for a power to a regular mob will probably not result in that mob gaining that power, as it is likely that it first requires the mob to be identified as an elite mob.
EliteMobs使用了一些元数据类型. 在试图混淆元数据之前, 我推荐你先查找代码的使用方法. 例如给一个普通的怪物添加能力的元数据很有可能无法使怪物得到该能力, 很有可能是因为首先这个怪物需要先被验证精英怪.


Here's a short list of rules at least most metadata follows:
下面是一个适用于大多数元数据的简短规则列表:


*The metadata associated to EliteMobs is systematically flushed upon a number of events (ex: chunk unload events, death events, player quit events...)
*与EliteMobs相关联的元数据在许多事件上被系统地刷新 (例如: 区块卸载事件, 死亡事件, 玩家退出游戏事件...)
*Regardless of value, boolean metadata is either present or not present. If a mob has a certain boolean metadata, the code assumes it's meant to be used. When that metadata is no longer necessary, it is deleted. If you find yourself setting boolean metadata to false, you probably should simply be deleting it instead.
*无论值如何,布尔元数据都存在或不存在. 如果一个怪物具有某个布尔元数据, 则该代码假定它会被使用. 当这一元数据没有存在的必要的时候, 它会被删除. 如果你发现自己将布尔元数据设置为false,则你应该删除它.
*While most metadata can probably be scanned properly in events, not all metadata can simply be injected into the runtime. Certain metadata can only be injected if other metadata is injected previously or is only verified when a certain method is called. I recommend you look into the source code in order to see how the metadata you want to use is used by the plugin.
*虽然大多数元数据可能在事件中被正确扫描,但并非所有元数据都可以在运行时被简单地注入. 某些元数据只能在先前注入其他元数据时才被注入,或者仅当某个方法被调用时才会被验证. 我推荐你查看源码来正确使用元数据.
=元数据列表=
=元数据列表=
  //plugin name
  //插件名
  public final static String ELITE_MOBS = "EliteMobs";
  public final static String ELITE_MOBS = "EliteMobs";
  //plugin metadata
  //插件元数据
  public final static String ELITE_MOB_MD = "EliteMob"; //tags mob as an elite mob
  public final static String ELITE_MOB_MD = "EliteMob"; //作为精英怪的标签
  public final static String PASSIVE_ELITE_MOB_MD = "PassiveEliteMob"; //tags mob as a passive elite mob
  public final static String PASSIVE_ELITE_MOB_MD = "PassiveEliteMob"; //作为被动精英怪的标签
  public final static String NATURAL_MOB_MD = "NaturalMob"; //tags mob as having spawned naturally
  public final static String NATURAL_MOB_MD = "NaturalMob"; //作为自然生成的怪物的标签
  public final static String MAJOR_POWER_AMOUNT_MD = "MajorPowerAmount"; //tags the amount of major powers the mob has
  public final static String MAJOR_POWER_AMOUNT_MD = "MajorPowerAmount"; //主力怪物数量标签
  public final static String MINOR_POWER_AMOUNT_MD = "MinorPowerAmount"; //tags the amoutn of minor powers the mob has
  public final static String MINOR_POWER_AMOUNT_MD = "MinorPowerAmount"; //怪物拥有的特殊能力数的标签
  public final static String MAJOR_VISUAL_EFFECT_MD = "MajorVisualEffect"; //tags that the mob is displaying major visual effects
  public final static String MAJOR_VISUAL_EFFECT_MD = "MajorVisualEffect"; //主力怪物环绕粒子特效的标签
  public final static String VISUAL_EFFECT_MD = "VisualEffect"; //tags that the mob is displaying minor visual effects
  public final static String VISUAL_EFFECT_MD = "VisualEffect"; //物环绕粒子特效的标签
  public final static String CUSTOM_NAME = "CustomName";
  public final static String CUSTOM_NAME = "CustomName";
  public final static String CUSTOM_ARMOR = "CustomArmor";
  public final static String CUSTOM_ARMOR = "CustomArmor";
第29行: 第30行:
  public final static String FORBIDDEN_MD = "Forbidden";
  public final static String FORBIDDEN_MD = "Forbidden";
  public final static String CUSTOM_POWERS_MD = "Custom";
  public final static String CUSTOM_POWERS_MD = "Custom";
  //Major powers
  //Major powers·怪物主力
  public final static String ZOMBIE_FRIENDS_MD = "ZombieFriends";
  public final static String ZOMBIE_FRIENDS_MD = "ZombieFriends";
  public final static String ZOMBIE_NECRONOMICON_MD = "ZombieNecronomicon";
  public final static String ZOMBIE_NECRONOMICON_MD = "ZombieNecronomicon";
  public final static String ZOMBIE_TEAM_ROCKET_MD = "ZombieTeamRocket";
  public final static String ZOMBIE_TEAM_ROCKET_MD = "ZombieTeamRocket";
  public final static String ZOMBIE_PARENTS_MD= "ZombieParents";
  public final static String ZOMBIE_PARENTS_MD= "ZombieParents";
  //Major powers human format
  //Major powers human format·人形怪物主力
  public final static String ZOMBIE_FRIENDS_H = "ZombieFriends";
  public final static String ZOMBIE_FRIENDS_H = "ZombieFriends";
  public final static String ZOMBIE_NECRONOMICON_H = "ZombieNecronomicon";
  public final static String ZOMBIE_NECRONOMICON_H = "ZombieNecronomicon";
  public final static String ZOMBIE_TEAM_ROCKET_H = "ZombieTeamRocket";
  public final static String ZOMBIE_TEAM_ROCKET_H = "ZombieTeamRocket";
  public final static String ZOMBIE_PARENTS_H= "ZombieParents";
  public final static String ZOMBIE_PARENTS_H= "ZombieParents";
  //Minor powers
  //Minor powers·特殊能力
  public final static String ATTACK_ARROW_MD = "AttackArrow";
  public final static String ATTACK_ARROW_MD = "AttackArrow";
  public final static String ATTACK_BLINDING_MD = "AttackBlinding";
  public final static String ATTACK_BLINDING_MD = "AttackBlinding";
第62行: 第63行:
  public final static String INVISIBILITY_MD = "Invisibility";
  public final static String INVISIBILITY_MD = "Invisibility";
  public final static String TAUNT_MD = "Taunt";
  public final static String TAUNT_MD = "Taunt";
  //Minor powers human format
  //Minor powers human format·人形怪物特殊能力
  public final static String ATTACK_ARROW_H = "Archer";
  public final static String ATTACK_ARROW_H = "Archer";
  public final static String ATTACK_BLINDING_H = "Blindness";
  public final static String ATTACK_BLINDING_H = "Blindness";
第87行: 第88行:
   
   
   
   
  //powerEffects
  //powerEffects·能力效果
  public final static String FROZEN = "Frozen";
  public final static String FROZEN = "Frozen";
  public final static String FROZEN_COOLDOWN = "FrozenCooldown";
  public final static String FROZEN_COOLDOWN = "FrozenCooldown";
第98行: 第99行:
  public final static String SHOOTING_FIREBALLS = "ShootingFireballs";
  public final static String SHOOTING_FIREBALLS = "ShootingFireballs";
   
   
  //third party compatibility
  //third party compatibility·插件兼容性
  public final static String BETTERDROPS_COMPATIBILITY_MD = "betterdrops_ignore";
  public final static String BETTERDROPS_COMPATIBILITY_MD = "betterdrops_ignore";

2018年12月21日 (五) 14:40的最新版本

几乎所有有关EliteMob存储Minecraft实体的自定义数据都已经用元数据处理 .

这使得具有基本的插件制作技巧的人能够非常容易地劫持和注入监听器.

我已经尝试过在同一个class内编译所有现有元数据(MetadataHandler) .

使用EliteMobs的元数据

EliteMobs使用了一些元数据类型. 在试图混淆元数据之前, 我推荐你先查找代码的使用方法. 例如给一个普通的怪物添加能力的元数据很有可能无法使怪物得到该能力, 很有可能是因为首先这个怪物需要先被验证精英怪.

下面是一个适用于大多数元数据的简短规则列表:

  • 与EliteMobs相关联的元数据在许多事件上被系统地刷新 (例如: 区块卸载事件, 死亡事件, 玩家退出游戏事件...)
  • 无论值如何,布尔元数据都存在或不存在. 如果一个怪物具有某个布尔元数据, 则该代码假定它会被使用. 当这一元数据没有存在的必要的时候, 它会被删除. 如果你发现自己将布尔元数据设置为false,则你应该删除它.
  • 虽然大多数元数据可能在事件中被正确扫描,但并非所有元数据都可以在运行时被简单地注入. 某些元数据只能在先前注入其他元数据时才被注入,或者仅当某个方法被调用时才会被验证. 我推荐你查看源码来正确使用元数据.

元数据列表

//插件名
public final static String ELITE_MOBS = "EliteMobs";
//插件元数据
public final static String ELITE_MOB_MD = "EliteMob"; //作为精英怪的标签
public final static String PASSIVE_ELITE_MOB_MD = "PassiveEliteMob"; //作为被动精英怪的标签
public final static String NATURAL_MOB_MD = "NaturalMob"; //作为自然生成的怪物的标签
public final static String MAJOR_POWER_AMOUNT_MD = "MajorPowerAmount"; //主力怪物数量标签
public final static String MINOR_POWER_AMOUNT_MD = "MinorPowerAmount"; //怪物拥有的特殊能力数的标签
public final static String MAJOR_VISUAL_EFFECT_MD = "MajorVisualEffect"; //主力怪物环绕粒子特效的标签
public final static String VISUAL_EFFECT_MD = "VisualEffect"; //物环绕粒子特效的标签
public final static String CUSTOM_NAME = "CustomName";
public final static String CUSTOM_ARMOR = "CustomArmor";
public final static String CUSTOM_HEALTH = "CustomHealth";
public final static String TAUNT_NAME = "Taunt_Name";
public final static String FORBIDDEN_MD = "Forbidden";
public final static String CUSTOM_POWERS_MD = "Custom";
//Major powers·怪物主力
public final static String ZOMBIE_FRIENDS_MD = "ZombieFriends";
public final static String ZOMBIE_NECRONOMICON_MD = "ZombieNecronomicon";
public final static String ZOMBIE_TEAM_ROCKET_MD = "ZombieTeamRocket";
public final static String ZOMBIE_PARENTS_MD= "ZombieParents";
//Major powers human format·人形怪物主力
public final static String ZOMBIE_FRIENDS_H = "ZombieFriends";
public final static String ZOMBIE_NECRONOMICON_H = "ZombieNecronomicon";
public final static String ZOMBIE_TEAM_ROCKET_H = "ZombieTeamRocket";
public final static String ZOMBIE_PARENTS_H= "ZombieParents";
//Minor powers·特殊能力
public final static String ATTACK_ARROW_MD = "AttackArrow";
public final static String ATTACK_BLINDING_MD = "AttackBlinding";
public final static String ATTACK_CONFUSING_MD = "AttackConfusing";
public final static String ATTACK_FIRE_MD = "AttackFire";
public final static String ATTACK_FIREBALL_MD = "AttackFireball";
public final static String ATTACK_FREEZE_MD = "AttackFreeze";
public final static String ATTACK_GRAVITY_MD = "AttackGravity";
public final static String ATTACK_POISON_MD = "AttackPoison";
public final static String ATTACK_PUSH_MD = "AttackPush";
public final static String ATTACK_WEAKNESS_MD = "AttackWeakness";
public final static String ATTACK_WEB_MD = "AttackWeb";
public final static String ATTACK_WITHER_MD = "AttackWither";
public final static String BONUS_LOOT_MD = "BonusLoot";
public final static String DOUBLE_DAMAGE_MD = "DoubleDamage";
public final static String DOUBLE_HEALTH_MD = "DoubleHealth";
public final static String INVULNERABILITY_ARROW_MD = "InvulnerabilityArrow";
public final static String INVULNERABILITY_FALL_DAMAGE_MD = "InvulnerabilityFallDamage";
public final static String INVULNERABILITY_FIRE_MD = "InvulnerabilityFire";
public final static String INVULNERABILITY_KNOCKBACK_MD = "InvulnerabilityKnockback";
public final static String MOVEMENT_SPEED_MD = "MovementSpeed";
public final static String INVISIBILITY_MD = "Invisibility";
public final static String TAUNT_MD = "Taunt";
//Minor powers human format·人形怪物特殊能力
public final static String ATTACK_ARROW_H = "Archer";
public final static String ATTACK_BLINDING_H = "Blindness";
public final static String ATTACK_CONFUSING_H = "Confusion";
public final static String ATTACK_FIRE_H = "Pyromancer";
public final static String ATTACK_FIREBALL_H = "Fireball";
public final static String ATTACK_FREEZE_H = "Cryomancer";
public final static String ATTACK_GRAVITY_H = "Levitation";
public final static String ATTACK_POISON_H = "Poisonous";
public final static String ATTACK_PUSH_H = "Knockback";
public final static String ATTACK_WEAKNESS_H = "Exhausting";
public final static String ATTACK_WEB_H = "Webbing";
public final static String ATTACK_WITHER_H = "Withering";
public final static String BONUS_LOOT_H = "Treasure";
public final static String DOUBLE_DAMAGE_H = "Berserker";
public final static String DOUBLE_HEALTH_H = "Tank";
public final static String INVULNERABILITY_ARROW_H = "Arrowproof";
public final static String INVULNERABILITY_FALL_DAMAGE_H = "Light";
public final static String INVULNERABILITY_FIRE_H = "Fireproof";
public final static String INVULNERABILITY_KNOCKBACK_H = "Heavy";
public final static String MOVEMENT_SPEED_H = "Fast";
public final static String INVISIBILITY_H = "Invisible";
public final static String TAUNT_H = "Taunt";


//powerEffects·能力效果
public final static String FROZEN = "Frozen";
public final static String FROZEN_COOLDOWN = "FrozenCooldown";
public final static String ZOMBIE_FRIENDS_ACTIVATED = "ZombieFriendsActivated";
public final static String TEAM_ROCKET_MEMBER= "TeamRocketMember";
public final static String TEAM_ROCKET_ACTIVATED = "TeamRocketActivated";
public final static String ZOMBIE_PARENTS_ACTIVATED = "ZombieParentsActivated";
public final static String ZOMBIE_CHANTING = "ZombieChanting";
public final static String SHOOTING_ARROWS = "ShootingArrows";
public final static String SHOOTING_FIREBALLS = "ShootingFireballs";

//third party compatibility·插件兼容性
public final static String BETTERDROPS_COMPATIBILITY_MD = "betterdrops_ignore";