From a07d23f515080bae601ebc356c6857d1426f4157 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 14 Apr 2022 15:03:40 +0200 Subject: [PATCH] Add ECLIPSE Wing particle --- .../lobby/particle/ParticleInventory.java | 5 ++ .../lobby/particle/decorator/ECLIPSE-Logo.png | Bin 0 -> 1480 bytes .../particle/decorator/WingParticle.java | 1 + .../particles/SpecialTeamParticle.java | 43 ++++++++++++++++++ src/de/steamwar/lobby/util/LobbyPlayer.java | 4 ++ 5 files changed, 53 insertions(+) create mode 100644 src/de/steamwar/lobby/particle/decorator/ECLIPSE-Logo.png create mode 100644 src/de/steamwar/lobby/particle/particles/SpecialTeamParticle.java 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 0000000000000000000000000000000000000000..71441ca712d6a85859d1bc23192081cbecdb7c78 GIT binary patch literal 1480 zcmZ{kO=uHA6o6;biZ%VCVkx8`OBAfu>}I!VHS2b)6deKW!4?-`}gCOX^t6(dFcoM;bic&!+Qt{Lx7WK_0P1cxhn9Q5^-uGta&6}AX z=s#TRbU6`1wSB$8F!W8(s;eCE-+Xq83@S&vLR|x{_8>&XPF@9!0LcEvf1+P!wd^G1H0^fmU578Mn+)SY&Oee+Za_FWjVj! z&w6>5=RM%z(I?Y}Y#xYMLf-tl=ybcuM1?Q6&RDcCPi8_( zTC>EWEKcGSP8&MQF&tZtgWVRuw4TofFtf4G8R0KKB4%!T*U_ec( z+R2O@#nL)rQ`x*p(uIJU%4k@(*48ev|LIEoBVnwo$q7=DlD{Jl*p;QgaZP~&lq~?( zV@+V!mHHRspGqr+#OIL`btyGev=^6USLOkcCHKg7uX2~x(!#BkoN%J+FM#Bna(wy> zkAm43>>6xod~o7S-BoYRllba0?Zs_+JoI(GzM^LAPES0&(o-2}SYF%yow@Sx;QU+1 z?~B#v7Z+ZCtEcz2Hilo$Pk(TnTllru+d%#Nv%L86G!D3q4y?F-tj;anOw7!6yIjwO pxg$*1r6oRbZ%$6^&R&jC@2Oq;@SC>#UoMcBsjsI$_^5mM+Fz)Tqr3nB literal 0 HcmV?d00001 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; }