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

EliteMobs/Spigot元数据

来自Minecraft插件百科
跳转到导航 跳转到搜索

几乎所有有关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";