Check if mob is a Forge entity.

Discussion in 'Spigot Plugin Development' started by BadBoy6767, Mar 1, 2016.

  1. I am using KCauldron which is pretty much Spigot and Forge at the same time.
    Now I need to cancel and events to do with interacting with entities.
    Except for CustomNPCs, which is a problem since it is a Forge mob.
    I made my plugin broadcast the entity's class name.
    And if I right click a customnpcs entity it broadcasts org.bukkit.craftbukkit.v1_7_R4.CraftCreature
    But CraftCreature could be anything, too.

    Any ideas?
     
    • Creative Creative x 1
  2. I have never done anything with Forge/Spigot plugins but try this.
    add your mod to the Build path and then check if the entity is an instance of the Mob class from the Mod.
     
  3. It's false.
     
  4. CreatureSpawnEvent :)