disable launch fireworks

Discussion in 'Plugin Development' started by y4sk, May 27, 2021.

  1. Offline

    y4sk

    How do I disable the firework when it is launched

    I'm creating a battle system when the player wins, spawn fireworks, but the other players are seeing the fires and I want to disable that, help please
     
    Last edited by a moderator: May 27, 2021
  2. Offline

    timtower Administrator Administrator Moderator

    @y4sk Why would it get launched then? Do you just want the explosion?
     
  3. Offline

    y4sk

    I wanted to launch only to the player who won the battle
     
  4. Offline

    timtower Administrator Administrator Moderator

    @y4sk What do you have now then?
     
  5. Offline

    y4sk

    I would like to know the event that disables
     
  6. Offline

    timtower Administrator Administrator Moderator

    @y4sk Show a screenshot of the effect that you want to disable because I still have no idea what you want to do.
     
  7. Offline

    darthvader1925

    have a playerinteractevent, check if its a firework, check if the player isn't the winner (probably in arraylist), cancel the event

    Edit: I assume you probably edited the question so now this probably wouldn't work since they are not spawning it
     
    Last edited: May 28, 2021
  8. Offline

    davidclue

    @y4sk You have two options here, Option 1: Play the sound and spawn the particles just for the player who won (Not spawning any firework entity just the sounds and particles so it will be a little difficult). Option 2: Spawn the fireworks and use NMS to send an entity destroy packet to everyone except the winner (I am not sure if this will show everyone the particles still you will need to test) however NMS is version-specific so it kind of will be annoying.
     

Share This Page