From f64b60bb58eb873c97b7afd112ff01ece5c75741 Mon Sep 17 00:00:00 2001 From: jojo Date: Tue, 23 Feb 2021 11:51:18 +0100 Subject: [PATCH] Fix Copyright notice --- src/de/steamwar/lobby/inventories/ParticleInventory.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/lobby/inventories/ParticleInventory.java b/src/de/steamwar/lobby/inventories/ParticleInventory.java index 7719e91..cd3f7a8 100644 --- a/src/de/steamwar/lobby/inventories/ParticleInventory.java +++ b/src/de/steamwar/lobby/inventories/ParticleInventory.java @@ -75,7 +75,7 @@ public class ParticleInventory { teamParticles.add(new SimpleParticle(Material.HONEY_BOTTLE, "§6Honey", teamLore, Particle.DRIPPING_HONEY, 0.2F, 0.2F, 0.2F, 1)); teamParticles.add(new SimpleParticle(Material.HONEYCOMB, "§6Nectar", teamLore, Particle.FALLING_NECTAR, 0.2F, 0.2F, 0.2F, 1)); teamParticles.add(new FunctionalParticle(Material.FIRE_CHARGE, "§7Firework", loreBuilder(new String[]{"in Luft"}, "Team beitritt"), (world, player, time) -> { - if (world.getBlockAt(player.getLocation().subtract(0, 1, 0)).getType() == Material.AIR) { + if (world.getBlockAt(player.getLocation().subtract(0, 1, 0)).getType() == Material.AIR) { world.spawnParticle(Particle.FIREWORKS_SPARK, player.getLocation().subtract(0, -0.2, 0), 2, 0.1F, 0.1F, 0.1F, 0.2); } })); @@ -123,6 +123,9 @@ public class ParticleInventory { if (steamwarUser.getTeam() != 0) { particleSWListInv = new SWListInv<>(player, "§6Partikel", false, teamParticlesEntries, (clickType, particle) -> lobbyPlayer.setParticle(particle)); } else { + if (teamParticles.contains(lobbyPlayer.getParticle())) { + lobbyPlayer.setParticle(null); + } particleSWListInv = new SWListInv<>(player, "§6Partikel", false, playerParticlesEntries, (clickType, particle) -> lobbyPlayer.setParticle(particle)); } } else {