diff --git a/src/de/steamwar/lobby/particle/ParticleInventory.java b/src/de/steamwar/lobby/particle/ParticleInventory.java index 551e6db..4cac6d4 100644 --- a/src/de/steamwar/lobby/particle/ParticleInventory.java +++ b/src/de/steamwar/lobby/particle/ParticleInventory.java @@ -77,6 +77,11 @@ public class ParticleInventory { clickable |= events.contains(particle.getEvent()); addParticle(particleList, particle, clickable, player); } + for (SpecialTeamParticle particle : SpecialTeamParticle.particles) { + if (particle.getTeamId() == 0 || steamwarUser.getTeam() == particle.getTeamId()) { + addParticle(particleList, particle, true, player); + } + } SWListInv particleSWListInv = new SWListInv<>(player, LobbySystem.getMessage().parse("PARTICLE_INVENTORY", player), false, particleList, (clickType, particle) -> { if (particle == null) return; diff --git a/src/de/steamwar/lobby/particle/decorator/ECLIPSE-Logo.png b/src/de/steamwar/lobby/particle/decorator/ECLIPSE-Logo.png new file mode 100644 index 0000000..71441ca Binary files /dev/null and b/src/de/steamwar/lobby/particle/decorator/ECLIPSE-Logo.png differ diff --git a/src/de/steamwar/lobby/particle/decorator/WingParticle.java b/src/de/steamwar/lobby/particle/decorator/WingParticle.java index ea48404..e12ed44 100644 --- a/src/de/steamwar/lobby/particle/decorator/WingParticle.java +++ b/src/de/steamwar/lobby/particle/decorator/WingParticle.java @@ -57,6 +57,7 @@ public class WingParticle implements BaseParticle, Listener { WGS("WingWGS.png"), SWORD_CROSSED("WingSwordCrossed.png"), MWGL("MWGL.png"), + ECLIPSE("ECLIPSE-Logo.png"), ; private List vectors = new ArrayList<>(); diff --git a/src/de/steamwar/lobby/particle/particles/SpecialTeamParticle.java b/src/de/steamwar/lobby/particle/particles/SpecialTeamParticle.java new file mode 100644 index 0000000..c1710f0 --- /dev/null +++ b/src/de/steamwar/lobby/particle/particles/SpecialTeamParticle.java @@ -0,0 +1,43 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2022 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.lobby.particle.particles; + +import de.steamwar.lobby.particle.BaseParticle; +import de.steamwar.lobby.particle.ParticleItem; +import de.steamwar.lobby.particle.SimpleParticle; +import de.steamwar.lobby.particle.decorator.TickParticle; +import de.steamwar.lobby.particle.decorator.WingParticle; +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.bukkit.Particle; + +import static org.bukkit.Material.ENDER_CHEST; + +@Getter +@AllArgsConstructor +public enum SpecialTeamParticle implements ParticleEnum { + + WarGearSeason(34, new TickParticle(new WingParticle(new SimpleParticle(new ParticleItem(ENDER_CHEST, "PARTICLE_EVENT_ENCHANTING"), Particle.PORTAL), 0.15, WingParticle.WingDesign.ECLIPSE))), + ; + public static SpecialTeamParticle[] particles = values(); + + private int teamId; + private BaseParticle particle; +} diff --git a/src/de/steamwar/lobby/util/LobbyPlayer.java b/src/de/steamwar/lobby/util/LobbyPlayer.java index 03927ba..53a03c7 100644 --- a/src/de/steamwar/lobby/util/LobbyPlayer.java +++ b/src/de/steamwar/lobby/util/LobbyPlayer.java @@ -56,12 +56,16 @@ public class LobbyPlayer { break; case "EventParticle": particle = EventParticle.valueOf(strings[1]); + break; case "EventParticleParticipation": particle = EventParticleParticipation.valueOf(strings[1]); break; case "EventParticlePlacement": particle = EventParticlePlacement.valueOf(strings[1]); break; + case "SpecialParticle": + particle = SpecialTeamParticle.valueOf(strings[1]); + break; default: break; }