13
0

Add EventParticle
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-03-25 10:23:49 +01:00
Ursprung af273ab2e1
Commit 88e03a09a9
3 geänderte Dateien mit 50 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -17,6 +17,7 @@ PARTICLE_DESELECT = §8Keine Partikel
PARTICLE_LOCKED = {0} §8- §c§lGesperrt
PARTICLE_UNLOCKED_BY_TEAM = §eTeam Beitritt
PARTICLE_UNLOCKED_BY_EVENT = §eEvent teilnahme
PARTICLE_UNLOCKED_BY_SERVER_TEAM = §eServer Team
PARTICLE_ATTRIBUTE_CIRCLE = §8-§f Ring

Datei anzeigen

@ -64,6 +64,9 @@ public class ParticleInventory {
}
Set<Integer> events = steamwarUser.getTeam() == 0 ? new HashSet<>() : TeamTeilnahme.getEvents(steamwarUser.getTeam()).stream().map(Event::getEventID).collect(Collectors.toSet());
if (!events.isEmpty()) {
calculateParticles(EventParticle.particles, player, particleList);
}
for (EventParticlePlacement particle : EventParticlePlacement.particles) {
boolean clickable = userGroup.isTeamGroup();
clickable |= (steamwarUser.getTeam() != 0 && contains(particle.getPlacementTeams(), steamwarUser.getTeam()));

Datei anzeigen

@ -0,0 +1,46 @@
/*
* 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 <https://www.gnu.org/licenses/>.
*/
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.CircleParticle;
import de.steamwar.lobby.particle.decorator.NonFloorParticle;
import de.steamwar.lobby.particle.decorator.TickParticle;
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 EventParticle implements ParticleEnum {
WATER(new TickParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(WATER_BUCKET, "PARTICLE_WATER", "PARTICLE_UNLOCKED_BY_EVENT"), Particle.DRIP_WATER), location -> location.add(0, 1.1, 0))))),
LAVA(new TickParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(LAVA_BUCKET, "PARTICLE_FIRE", "PARTICLE_UNLOCKED_BY_EVENT"), Particle.DRIP_LAVA), location -> location.add(0, 1.1, 0))))),
;
public static ParticleEnum[] particles = values();
@Getter
private BaseParticle particle;
}