Library [1.8] ParticleEffect v1.7

Discussion in 'Resources' started by DarkBladee12, Jun 20, 2013.

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

    DarkBladee12

    valon750 Nope, there's no way to change the color of the LARGE_SMOKE effect since its color is hard coded in Minecraft :/
     
  2. Offline

    valon750

    DarkBladee12

    Darn, any ideas on what I could do to implement a feature similar to that? I did previously use a blockBreak animation, but it just didn't look elegant enough.

    perhaps potion splash, minus the sound? Is that achievable?
     
  3. Offline

    sgavster

    valon750 That should be possible (amazing idea man!) just use packets to remove the sounds
     
  4. Offline

    valon750

    sgavster

    Personally I have no experience with packets, so that sort of thing intimidates me 0.0

    DarkBladee12

    While I'm on the subject of potion particles, I'm currently using the "MOB_SPELL" option...

    Is there any ability to have the particles only fire downwards? the offset appears to add an additional stream, as well as alter the speed of which the particles come out of both directions.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 29, 2015
  5. Offline

    BungeeTheCookie

  6. Offline

    KingMagnus

    The RED_DUST, MOB_SPELL, and CRIT particles don't work for me. I haven't tested all of them though. So not sure what else doesn't work. I'm basing this off of the latest Beta build for 1.7.2.

    EDIT: Also, in your getPlayersinRange method, wouldn't it be better to use Server.getOnlinePlayers(), it would be easier to avoid conflicts with other plugins that create their own players that aren't actually players(like NPC plugins) that way.
     
  7. Offline

    DarkBladee12

    KingMagnus I can't confirm that RED_DUST, MOB_SPELL and CRIT don't work, because they work perfectly for me. (Maybe you used invalid values?) I'm going to change it so it only checks the online players ;)
     
    KingMagnus likes this.
  8. Offline

    KingMagnus

    Sorry for that, turns out the method I was using to make sure people didn't spawn negative particles cancelled out when the minimum and maximum values were the same, and thanks for responding. :D
     
  9. Offline

    HeavyMine13

  10. Offline

    HeavyMine13

    How can I cancel the effect on player logout? This is what I made:

    Code:
    package me.HeavyMine13.hj;
     
     
    import me.HeavyMine13.hj.ParticleEffect;
     
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.EventPriority;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.bukkit.event.player.PlayerLoginEvent;
    import org.bukkit.scheduler.BukkitScheduler;
    import org.bukkit.scoreboard.DisplaySlot;
    import org.bukkit.scoreboard.Objective;
    import org.bukkit.scoreboard.Scoreboard;
    import org.bukkit.scoreboard.ScoreboardManager;
     
    public class listeners implements Listener {
    Hj plugin;
     
    public listeners(Hj instance){
    plugin = instance;
    }
     
    {
    for (final Player p : Bukkit.getOnlinePlayers()) {
        if(p.isOnline()){
        if (p.hasPermission("particles.use")){
              BukkitScheduler scheduler = Bukkit.getServer().getScheduler();
              scheduler.scheduleSyncRepeatingTask (plugin, new Runnable() {
            public void run() {
                  ParticleEffect.NOTE.display(p.getLocation(),  0.5F, 1.0F, 0.5F, 1F, 1);
        }
              }, 80L, 0);
        }
        }else{
            this.cancel();
        }
    }
    }
     
     
    @EventHandler (priority = EventPriority.HIGH)
    public void onPlayerLogin(final PlayerLoginEvent event) {
      if(event.getPlayer().isOnline())
        if (event.getPlayer().hasPermission("particles.use")){
          BukkitScheduler scheduler = Bukkit.getServer().getScheduler();
          scheduler.scheduleSyncRepeatingTask (plugin, new Runnable() {
        public void run() {
              ParticleEffect.NOTE.display(event.getPlayer().getLocation(),  0.5F, 1.0F, 0.5F, 1F, 1);
    }
          }, 80L, 0);
          }
        }
     
     
    @EventHandler (priority = EventPriority.HIGH)
    public void onPlayerJoin(final PlayerJoinEvent event){
        ScoreboardManager manager = Bukkit.getScoreboardManager();
        Scoreboard board = manager.getNewScoreboard();
       
        Objective objective = board.registerNewObjective("showhealth", "health");
        objective.setDisplaySlot(DisplaySlot.BELOW_NAME);
        objective.setDisplayName(ChatColor.GREEN + "/ 20");
       
        for(Player online : Bukkit.getOnlinePlayers()){
        online.setScoreboard(board);
        event.getPlayer();
        online.setHealth(online.getHealth()); //Update their health
     
    }
    }
    }
     
    
     
  11. Offline

    valon750

    DarkBladee12

    Will you be considering adding in additional effects, or are these all that are available?

    I was curious about the effect played during the use of bonemeal, and if it could be incorporated in to this lib.

    (if it happens to already be present, I do apologise, I'm typing this as of 01:27am so I'm not quite with it)
     
  12. Offline

    DarkBladee12

    valon750 Hey, all available particle effects are in this lib currently and the bonemeal effect is called HAPPY_VILLAGER ;)
     
  13. Offline

    valon750

    DarkBladee12

    Ooooooh, no wonder I didn't see it xD Thank you!
     
  14. Offline

    ShearsSheep

  15. Offline

    HeavyMine13

    how can I spawn note particles above a player's head, I need the note particles to circle above his head!
     
  16. Offline

    Garris0n

    Well...you spawn them...above the player's head...
     
  17. Offline

    HeavyMine13

    Garris0n IK, but I cant get the correct float for the location; I got : 0.0f, 0.0f, 0.0f
     
  18. Offline

    Garris0n

    0.5, 0.5, 0.5?
     
  19. Offline

    HeavyMine13

  20. Offline

    Garris0n

    Post code, I suppose?
     
  21. Offline

    DarkBladee12

    HeavyMine13 This is how you'd get the location above the players' head: PLAYER.getLocation().add(0.5, 3, 0.5)
     
    HeavyMine13 likes this.
  22. Offline

    wilmervanheerde

    I'm using this library since a long time and I really like it, but is there a way to give colour to the fireworks spark? Thanks in advance.
     
  23. Offline

    DarkBladee12

    wilmervanheerde This has been asked over and over, also in several threads and I must sadly say that this is not possible :/ (That's because the API doesn't provide a way to modify firework particles)
     
  24. Offline

    HelGod

    I get an error saying that the class isn't found something like MINECRAFT_SERVER.PacketPlayOutputWorldParticles
     
  25. Offline

    DarkBladee12

    HelGod What Bukkit version are you currently running?
     
  26. Offline

    HelGod

  27. Offline

    DarkBladee12

    HelGod Should work then... Did you use Bukkit or CraftBukkit as the library for your plugin?
     
  28. Offline

    HelGod

  29. Offline

    DarkBladee12

    HelGod Strange, but if you encounter this another time, just import the CraftBukkit since it contains the NMS Classes.
     
  30. Offline

    97WaterPolo

    DarkBladee12
    trying to make a trail, how would I have it behind the player by about 1/2 a block? This is my current code
    Code:
    ParticleEffect.HEART.display(player.getLocation(), .25F, .1F, .25F, .1F, 33);
     
Thread Status:
Not open for further replies.

Share This Page