diff --git a/src/de/steamwar/lobby/particle/ParticleEnum.java b/src/de/steamwar/lobby/particle/ParticleEnum.java new file mode 100644 index 0000000..1fb2174 --- /dev/null +++ b/src/de/steamwar/lobby/particle/ParticleEnum.java @@ -0,0 +1,24 @@ +/* + * 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; + +public interface ParticleEnum { + BaseParticle getParticle(); +} diff --git a/src/de/steamwar/lobby/particle/PlayerParticle.java b/src/de/steamwar/lobby/particle/PlayerParticle.java index ea10ac0..c67bb75 100644 --- a/src/de/steamwar/lobby/particle/PlayerParticle.java +++ b/src/de/steamwar/lobby/particle/PlayerParticle.java @@ -21,13 +21,14 @@ package de.steamwar.lobby.particle; import de.steamwar.lobby.particle.mutator.LocationParticleMutator; import lombok.AllArgsConstructor; +import lombok.Getter; import org.bukkit.Material; import org.bukkit.Particle; import static org.bukkit.Material.*; @AllArgsConstructor -public enum PlayerParticle { +public enum PlayerParticle implements ParticleEnum { SNEEZE(new SimpleParticle(new ParticleItem(SLIME_BLOCK, "PARTICLE_SNEEZE"), Particle.SNEEZE, 0.2F, 0.2F, 0.2F, 0.01)), SMOKE(new SimpleParticle(new ParticleItem(COBWEB, "PARTICLE_SMOKE"), Particle.SMOKE_NORMAL, 0.2F, 0.2F, 0.2F, 0.01)), @@ -44,5 +45,8 @@ public enum PlayerParticle { SLIME(new SimpleParticle(new ParticleItem(SLIME_BALL, "PARTICLE_SLIME"), Particle.SLIME)), MOB(new SimpleParticle(new ParticleItem(ZOMBIE_HEAD, "PARTICLE_MOB"), Particle.SPELL_MOB)), ; + public static ParticleEnum[] particles = values(); + + @Getter private BaseParticle particle; }