Solved hasParticles() boolean not working?

Discussion in 'Plugin Development' started by flash110, Jun 4, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    flash110

    Ok so recently I have been trying to make a little colored name plugin and I have a setup that includes a squid riding the player, and a small marker armorstand riding the squid. It all works out great, but you can see the squids vanish particles. Here is the line:
    Code:
    sq.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 999999999, 1).hasParticles());
     
  2. Offline

    teej107

    @flash110 What Object is "sq"? Because if it is what I think it is then I'm surprised your code even compiled in the first place.
     
  3. Offline

    Kage0x3B

    teej107 likes this.
  4. Offline

    flash110

    @teej107 sq is a squid. Yes a squid.
     
  5. Offline

    Betagear

    You can't just boolean test an effect you're adding to an entity.
    Just keep it inside a variable, test if it has particles, then add it to the squid.

    What you are actually doing is adding a boolean to the squid as a potion effect.

    I don't see what you're trying to do.

    If you're trying to make the effect without particles, try storing the ParticleEffect, then setting the particles with setParticles (or something so), then apply the Particle effect to the squid.
     
Thread Status:
Not open for further replies.

Share This Page