hasMeta not working #318


Open
  • MattIsADev created this issue Apr 11, 2021

    Hello, I am currently having issues with the hasMeta="" entity attribute working. I have a custom plugin programmed by myself which sets an entities metadata of "dgagdjs" to true when the entity's spawn reason is not from a spawner; as you can see that here:

    event.getEntity().setMetadata("dgagdjs", new FixedMetadataValue(this.plugin, true));
    
    I double check myself by seeing if the entity has the same meta data when they die, if so it prints a message:
    
    if (event.getEntity().hasMetadata("dgagdjs")) {
        player.sendMessage("You have killed a natural spawning mob");
    }<br /><br />Although I get a message when the entity dies, when I try to ignore these entities in the config of ClearLagg, they still get cleared anyway.


    An example of how my villager entity is set up in the config:

    remove-entities: <br />- villager !hasMeta="dgagdjs"


    I am confused on why the entities still get cleared even though they have the correct metadata. This is not just affecting the villagers, it affecting all mobs that in the config with these same attributes attached to them.

    Thank you,
    Matt

     


To post a comment, please login or register a new account.