1.8.8 Spigot Invisibility Effect Issue

Discussion in 'Spigot Plugin Development' started by Nrc0611, Jan 27, 2020.

Thread Status:
Not open for further replies.
  1. I am currently experiencing an issue where when a player gets the effect invisibility the particles and the potion timer work but actually turning them invisible does not.

    This is an issue with my custom spigot and I am wondering if anyone knows where the file in the source code for the invisibility effect is. I have been trying to find it but still have no luck, any help is appreciated.
     
  2. Upload the jar of your custom spigot file here: http://www.javadecompilers.com/

    This will allow you to browse the code.

    (or just import the jar into your IDE)
     
  3. Ah, I already have the source code in folders that I can easily go through but there is simply so many files that I am not sure what the path is to find where the Effects are stored. I have been able to find the Effect command and other potion effect things but all they say is "INVISIBILITY" and I need to find this invisibility event code so I can fix it.

    EDIT: I ended up finding things in my EntityLiving.java that may have caused the issue im going to test it out.

    if (this.hasEffect(MobEffectList.INVISIBILITY)) {
    return;
    }
    // Disable invisibility
    this.setInvisible(this.hasEffect(MobEffectList.INVISIBILITY.id));


    Conclusion: Ended up fixing the issue, if anyone else has this issue I had a patch in my EntityLiving.java that prevented mobs from becoming invisible and affected players as well. The code above was the issue.
     
    #3 Nrc0611, Jan 27, 2020
    Last edited: Jan 28, 2020
Thread Status:
Not open for further replies.