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

EliteMobs/Spigot元数据

来自Minecraft插件百科
Qsefthuopq留言 | 贡献2018年5月31日 (四) 11:31的版本 (创建页面,内容为“Nearly everything related to EliteMob custom data in the plugin is handled using metadata stored on Minecraft entities. This makes hijacking and injecting Elitemobs...”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转到导航 跳转到搜索

Nearly everything related to EliteMob custom data in the plugin is handled using metadata stored on Minecraft entities.

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.

使用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.

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...)
  • 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.
  • 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";
//plugin metadata
public final static String ELITE_MOB_MD = "EliteMob"; //tags mob as an elite mob
public final static String PASSIVE_ELITE_MOB_MD = "PassiveEliteMob"; //tags mob as a passive elite mob
public final static String NATURAL_MOB_MD = "NaturalMob"; //tags mob as having spawned naturally
public final static String MAJOR_POWER_AMOUNT_MD = "MajorPowerAmount"; //tags the amount of major powers the mob has
public final static String MINOR_POWER_AMOUNT_MD = "MinorPowerAmount"; //tags the amoutn of minor powers the mob has
public final static String MAJOR_VISUAL_EFFECT_MD = "MajorVisualEffect"; //tags that the mob is displaying major visual effects
public final static String VISUAL_EFFECT_MD = "VisualEffect"; //tags that the mob is displaying minor visual effects
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";