13
0

Particle #4

Zusammengeführt
Lixfel hat 24 Commits von Particle nach master 2022-03-26 16:26:40 +01:00 zusammengeführt
12 geänderte Dateien mit 97 neuen und 61 gelöschten Zeilen
Nur Änderungen aus Commit 94c6fc934b werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -16,6 +16,9 @@ PARTICLE_INVENTORY = §6Partikel
PARTICLE_DESELECT = §8Keine Partikel PARTICLE_DESELECT = §8Keine Partikel
PARTICLE_LOCKED = {0} §8- §c§lGesperrt PARTICLE_LOCKED = {0} §8- §c§lGesperrt
PARTICLE_UNLOCKED_BY_TEAM = §eTeam Beitritt
YoyoNow markierte diese Unterhaltung als gelöst Veraltet
Veraltet
Review

Teambeitritt

Teambeitritt
PARTICLE_UNLOCKED_BY_SERVER_TEAM = §eServer Team
YoyoNow markierte diese Unterhaltung als gelöst Veraltet
Veraltet
Review

Eventteilnahme

Eventteilnahme
YoyoNow markierte diese Unterhaltung als gelöst Veraltet
Veraltet
Review

Serverteam

Serverteam
PARTICLE_ATTRIBUTE_CIRCLE = §8-§f Ring PARTICLE_ATTRIBUTE_CIRCLE = §8-§f Ring
PARTICLE_ATTRIBUTE_BI_CIRCLE = §8-§f Doppel Ring PARTICLE_ATTRIBUTE_BI_CIRCLE = §8-§f Doppel Ring
PARTICLE_ATTRIBUTE_CLOUD = §8-§f Wolke PARTICLE_ATTRIBUTE_CLOUD = §8-§f Wolke
YoyoNow markierte diese Unterhaltung als gelöst Veraltet
Veraltet
Review

Doppelring

Doppelring
@ -60,3 +63,17 @@ PARTICLE_TOWN = §5Town
PARTICLE_ENCHANTING_CIRCLE = §fEnchanted PARTICLE_ENCHANTING_CIRCLE = §fEnchanted
PARTICLE_WATER_FIRE = §bWater§7/§cFire PARTICLE_WATER_FIRE = §bWater§7/§cFire
PARTICLE_MAGIC_ENCHANTING = §5Magic§7/§eZauber PARTICLE_MAGIC_ENCHANTING = §5Magic§7/§eZauber
PARTICLE_UNLOCKED_BY_WGS_PLACEMENT = WarGearSeason 1., 2. oder 3. Platz
PARTICLE_UNLOCKED_BY_WGS = WarGearSeason
PARTICLE_UNLOCKED_BY_AIRSHIPEVENT_PLACEMENT = AirshipEvent 1., 2. oder 3. Platz
PARTICLE_UNLOCKED_BY_AIRSHIPEVENT = AirshipEvent
Lixfel markierte diese Unterhaltung als gelöst Veraltet
Veraltet
Review

Wäre es hier nicht eleganter, den Namen des Events einfach aus der Datenbank einzufügen?

Wäre es hier nicht eleganter, den Namen des Events einfach aus der Datenbank einzufügen?
Veraltet
Review

Vermutlich, guck ich mir gleich an.

Vermutlich, guck ich mir gleich an.
PARTICLE_UNLOCKED_BY_HELLSBELLS_PLACEMENT = HellsBells 1., 2. oder 3. Platz
PARTICLE_UNLOCKED_BY_HELLSBELLS = HellsBells
PARTICLE_UNLOCKED_BY_UNDERWATER_PLACEMENT = Underwater 1., 2. oder 3. Platz
PARTICLE_UNLOCKED_BY_UNDERWATER = Underwater
PARTICLE_EVENT_ENCHANTING = §cVerzaubert
PARTICLE_EVENT_CLOUD = §fCloud
PARTICLE_EVENT_SMOKE = §7Smoke
PARTICLE_EVENT_WATER = §bWasser

Datei anzeigen

@ -21,15 +21,30 @@ package de.steamwar.lobby.particle;
import de.steamwar.lobby.particle.decorator.CircleParticle; import de.steamwar.lobby.particle.decorator.CircleParticle;
import de.steamwar.lobby.particle.decorator.CloudParticle; import de.steamwar.lobby.particle.decorator.CloudParticle;
import org.bukkit.Material; import de.steamwar.lobby.particle.mutator.LocationParticleMutator;
import org.bukkit.Particle; import org.bukkit.Particle;
import static org.bukkit.Material.*;
public enum EventParticle { public enum EventParticle {
WarGearSeason(22, new int[]{12, 285, 54}, new CloudCircleParticle(Material.ENCHANTING_TABLE, "§cVerzaubert", ParticleInventory.loreBuilder(new String[]{"Wolke", "Ring"}, "WarGearSeason 1., 2. oder 3. Platz"), Particle.ENCHANTMENT_TABLE, location -> location.add(0, 1.1, 0)), new SimpleParticle(Material.BOOK, "§5Verzaubert", ParticleInventory.loreBuilder(new String[0], "WarGearSeason"), Particle.ENCHANTMENT_TABLE)), WarGearSeason(22, new int[]{12, 285, 54},
AirshipEvent(26, new int[]{205, 9, 54, 120, 292}, new CircleParticle(Material.SNOWBALL, "§fCloud", ParticleInventory.loreBuilder(new String[]{"Ring"}, "AirshipEvent 1., 2. oder 3. Platz"), Particle.CLOUD, null, location -> location.add(0, 2.2, 0)), new SimpleParticle(Material.SNOW_BLOCK, "§fCloud", ParticleInventory.loreBuilder(new String[0], "AirshipEvent"), Particle.CLOUD)), new CloudParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(ENCHANTING_TABLE, "PARTICLE_EVENT_ENCHANTING", "PARTICLE_UNLOCKED_BY_WGS_PLACEMENT"), Particle.ENCHANTMENT_TABLE), location -> location.add(0, 1.1, 0)))),
HellsBellsWs(28, new int[]{205, 9, 11}, new CloudCircleParticle(Material.TNT_MINECART, "§7Smoke", ParticleInventory.loreBuilder(new String[]{"Wolke", "Ring"}, "HellsBells 1., 2. oder 3. Platz"), Particle.CAMPFIRE_COSY_SMOKE, location -> location.add(0, 2.2, 0)), new CircleParticle(Material.TNT, "§8Smoke", ParticleInventory.loreBuilder(new String[]{"Ring"}, "HellsBells"), Particle.CAMPFIRE_COSY_SMOKE, null, location -> location, 0, 0, 0, 0.01)), new SimpleParticle(new ParticleItem(BOOK, "PARTICLE_EVENT_ENCHANTING", "PARTICLE_UNLOCKED_BY_WGS"), Particle.ENCHANTMENT_TABLE)
Underwater(31, new int[]{9, 210, 520}, new CloudParticle(Material.PRISMARINE_CRYSTALS, "§bWasser", ParticleInventory.loreBuilder(new String[]{"Wolke"}, "Underwater 1., 2. oder 3. Platz"), Particle.DRIP_WATER), new SimpleParticle(Material.PRISMARINE_BRICKS, "§bWasser", ParticleInventory.loreBuilder(new String[0], "Underwater"), Particle.DRIP_WATER)); ),
AirshipEvent(26, new int[]{205, 9, 54, 120, 292},
new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(SNOWBALL, "PARTICLE_EVENT_CLOUD", "PARTICLE_UNLOCKED_BY_AIRSHIPEVENT_PLACEMENT"), Particle.CLOUD), location -> location.add(0, 2.2, 0))),
new SimpleParticle(new ParticleItem(SNOW_BLOCK, "PARTICLE_EVENT_CLOUD", "PARTICLE_UNLOCKED_BY_AIRSHIPEVENT"), Particle.CLOUD)
),
HellsBellsWs(28, new int[]{205, 9, 11},
new CloudParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(TNT_MINECART, "PARTICLE_EVENT_SMOKE", "PARTICLE_UNLOCKED_BY_HELLSBELLS_PLACEMENT"), Particle.CAMPFIRE_COSY_SMOKE), location -> location.add(0, 2.2, 0)))),
new CircleParticle(new SimpleParticle(new ParticleItem(TNT, "PARTICLE_EVENT_SMOKE", "PARTICLE_UNLOCKED_BY_HELLSBELLS"), Particle.CAMPFIRE_COSY_SMOKE, 0, 0, 0, 0.01))
),
Underwater(31, new int[]{9, 210, 520},
new CloudParticle(new SimpleParticle(new ParticleItem(PRISMARINE_SHARD, "PARTICLE_EVENT_WATER", "PARTICLE_UNLOCKED_BY_UNDERWATER_PLACEMENT"), Particle.DRIP_WATER)),
new SimpleParticle(new ParticleItem(PRISMARINE_BRICKS, "PARTICLE_EVENT_WATER", "PARTICLE_UNLOCKED_BY_UNDERWATER"), Particle.DRIP_WATER)
),
;
public static EventParticle[] eventParticles = values(); public static EventParticle[] eventParticles = values();

Datei anzeigen

@ -36,8 +36,9 @@ public class ParticleData {
private final double deg; private final double deg;
public ParticleData withLocation(Location location) { public ParticleData withLocation(Location location) {
this.location = location; ParticleData particleData = copy();
return this; particleData.location = location;
return particleData;
} }
public Location getLocation() { public Location getLocation() {
@ -47,7 +48,7 @@ public class ParticleData {
return location; return location;
} }
public ParticleData clone() { public ParticleData copy() {
return new ParticleData(world, player, location, deg); return new ParticleData(world, player, location, deg);
} }
} }

Datei anzeigen

@ -67,18 +67,18 @@ public class ParticleInventory {
boolean clickablePlacement = userGroup.isTeamGroup(); boolean clickablePlacement = userGroup.isTeamGroup();
clickablePlacement |= (steamwarUser.getTeam() != 0 && contains(eventParticle.placementTeams, steamwarUser.getTeam())); clickablePlacement |= (steamwarUser.getTeam() != 0 && contains(eventParticle.placementTeams, steamwarUser.getTeam()));
if (clickablePlacement) { if (clickablePlacement) {
particleList.add(new SWListInv.SWListEntry<>(eventParticle.placementParticle.getItem(), eventParticle.placementParticle)); particleList.add(new SWListInv.SWListEntry<>(eventParticle.placementParticle.getItem().toSWItem(player), eventParticle.placementParticle));
} else { } else {
SWItem swItem = eventParticle.placementParticle.getItem(); SWItem swItem = eventParticle.placementParticle.getItem().toSWItem(player);
swItem.setName(swItem.getItemMeta().getDisplayName() + " §8- §c§lGesperrt"); swItem.setName(LobbySystem.getMessage().parse("PARTICLE_LOCKED", player, swItem.getItemMeta().getDisplayName()));
particleList.add(new SWListInv.SWListEntry<>(swItem, null)); particleList.add(new SWListInv.SWListEntry<>(swItem, null));
} }
if (eventParticle.placementTeams.length != 0 && (userGroup.isTeamGroup() || events.contains(eventParticle.event))) { if (eventParticle.placementTeams.length != 0 && (userGroup.isTeamGroup() || events.contains(eventParticle.event))) {
particleList.add(new SWListInv.SWListEntry<>(eventParticle.participationParticles.getItem(), eventParticle.participationParticles)); particleList.add(new SWListInv.SWListEntry<>(eventParticle.participationParticles.getItem().toSWItem(player), eventParticle.participationParticles));
} else { } else {
SWItem swItem = eventParticle.participationParticles.getItem(); SWItem swItem = eventParticle.participationParticles.getItem().toSWItem(player);
swItem.setName(swItem.getItemMeta().getDisplayName() + " §8- §c§lGesperrt"); swItem.setName(LobbySystem.getMessage().parse("PARTICLE_LOCKED", player, swItem.getItemMeta().getDisplayName()));
particleList.add(new SWListInv.SWListEntry<>(swItem, null)); particleList.add(new SWListInv.SWListEntry<>(swItem, null));
} }
} }

Datei anzeigen

@ -22,7 +22,6 @@ package de.steamwar.lobby.particle;
import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWItem;
import de.steamwar.lobby.LobbySystem; import de.steamwar.lobby.LobbySystem;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -37,10 +36,14 @@ public class ParticleItem {
private final Material material; private final Material material;
private final String name; private final String name;
private final Set<String> attributes = new LinkedHashSet<>(); private final Set<String> attributes = new LinkedHashSet<>();
@Setter
private String unlockedBy; private String unlockedBy;
public ParticleItem(Material material, String name, String unlockedBy) {
this.material = material;
this.name = name;
this.unlockedBy = unlockedBy;
}
public ParticleItem addAttribute(String attribute) { public ParticleItem addAttribute(String attribute) {
this.attributes.add(attribute); this.attributes.add(attribute);
return this; return this;

Datei anzeigen

@ -44,7 +44,7 @@ public enum PlayerParticle implements ParticleEnum {
ANGRY(new SimpleParticle(new ParticleItem(REDSTONE_BLOCK, "PARTICLE_ANGRY"), Particle.VILLAGER_ANGRY, 0.2F, 0.2F, 0.2F, 0.01)), ANGRY(new SimpleParticle(new ParticleItem(REDSTONE_BLOCK, "PARTICLE_ANGRY"), Particle.VILLAGER_ANGRY, 0.2F, 0.2F, 0.2F, 0.01)),
SLIME(new SimpleParticle(new ParticleItem(SLIME_BALL, "PARTICLE_SLIME"), Particle.SLIME)), SLIME(new SimpleParticle(new ParticleItem(SLIME_BALL, "PARTICLE_SLIME"), Particle.SLIME)),
MOB(new SimpleParticle(new ParticleItem(ZOMBIE_HEAD, "PARTICLE_MOB"), Particle.SPELL_MOB)), MOB(new SimpleParticle(new ParticleItem(ZOMBIE_HEAD, "PARTICLE_MOB"), Particle.SPELL_MOB)),
; ;
public static ParticleEnum[] particles = values(); public static ParticleEnum[] particles = values();
@Getter @Getter

Datei anzeigen

@ -32,29 +32,29 @@ import static org.bukkit.Material.*;
@AllArgsConstructor @AllArgsConstructor
public enum ServerTeamParticle implements ParticleEnum { public enum ServerTeamParticle implements ParticleEnum {
WITCH(new SimpleParticle(new ParticleItem(EXPERIENCE_BOTTLE, "PARTICLE_WITCH"), Particle.SPELL_WITCH)), WITCH(new SimpleParticle(new ParticleItem(EXPERIENCE_BOTTLE, "PARTICLE_WITCH", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.SPELL_WITCH)),
ENCHANTING(new SimpleParticle(new ParticleItem(ENCHANTING_TABLE, "PARTICLE_ENCHANTING"), Particle.ENCHANTMENT_TABLE)), ENCHANTING(new SimpleParticle(new ParticleItem(ENCHANTING_TABLE, "PARTICLE_ENCHANTING", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.ENCHANTMENT_TABLE)),
HAPPY(new SimpleParticle(new ParticleItem(EMERALD_BLOCK, "PARTICLE_HAPPY"), Particle.VILLAGER_HAPPY, 0.2F, 0.2F, 0.2F, 0.01)), HAPPY(new SimpleParticle(new ParticleItem(EMERALD_BLOCK, "PARTICLE_HAPPY", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.VILLAGER_HAPPY, 0.2F, 0.2F, 0.2F, 0.01)),
FLAME(new SimpleParticle(new ParticleItem(FLINT_AND_STEEL, "PARTICLE_FLAME"), Particle.FLAME, 0F, 0.2F, 0F, 0.01)), FLAME(new SimpleParticle(new ParticleItem(FLINT_AND_STEEL, "PARTICLE_FLAME", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.FLAME, 0F, 0.2F, 0F, 0.01)),
END_ROD(new SimpleParticle(new ParticleItem(Material.END_ROD, "PARTICLE_END_ROD"), Particle.END_ROD, 0.2F, 0.2F, 0.2F, 0.01)), END_ROD(new SimpleParticle(new ParticleItem(Material.END_ROD, "PARTICLE_END_ROD", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.END_ROD, 0.2F, 0.2F, 0.2F, 0.01)),
CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(WHITE_WOOL, "PARTICLE_CLOUD"), Particle.CLOUD))), CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(WHITE_WOOL, "PARTICLE_CLOUD", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.CLOUD))),
TOTEM(new CloudParticle(new SimpleParticle(new ParticleItem(TOTEM_OF_UNDYING, "PARTICLE_TOTEM"), Particle.TOTEM))), TOTEM(new CloudParticle(new SimpleParticle(new ParticleItem(TOTEM_OF_UNDYING, "PARTICLE_TOTEM", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.TOTEM))),
ENCHANTING_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(WHITE_DYE, "PARTICLE_ENCHANTING"), Particle.ENCHANTMENT_TABLE))), ENCHANTING_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(WHITE_DYE, "PARTICLE_ENCHANTING", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.ENCHANTMENT_TABLE))),
FLAME_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(FIRE_CORAL_BLOCK, "PARTICLE_FLAME"), Particle.FLAME))), FLAME_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(FIRE_CORAL_BLOCK, "PARTICLE_FLAME", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.FLAME))),
SNEEZE_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(LIME_SHULKER_BOX, "PARTICLE_SNEEZE"), Particle.SNEEZE))), SNEEZE_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(LIME_SHULKER_BOX, "PARTICLE_SNEEZE", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.SNEEZE))),
SLIME_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(GREEN_SHULKER_BOX, "PARTICLE_SLIME"), Particle.SLIME))), SLIME_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(GREEN_SHULKER_BOX, "PARTICLE_SLIME", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.SLIME))),
SMOKE_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(DEAD_BRAIN_CORAL_BLOCK, "PARTICLE_SMOKE"), Particle.CAMPFIRE_COSY_SMOKE))), SMOKE_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(DEAD_BRAIN_CORAL_BLOCK, "PARTICLE_SMOKE", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.CAMPFIRE_COSY_SMOKE))),
TOWN_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(FIREWORK_STAR, "PARTICLE_TOWN"), Particle.TOWN_AURA))), TOWN_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(FIREWORK_STAR, "PARTICLE_TOWN", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.TOWN_AURA))),
FLAME_CIRCLE(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(MAGMA_BLOCK, "PARTICLE_FLAME"), Particle.FLAME, 0F, 0F, 0F, 0.01), location -> location.add(0, 1.1, 0)))), FLAME_CIRCLE(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(MAGMA_BLOCK, "PARTICLE_FLAME", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.FLAME, 0F, 0F, 0F, 0.01), location -> location.add(0, 1.1, 0)))),
ENCHANTING_CIRCLE(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(WHITE_DYE, "PARTICLE_ENCHANTING_CIRCLE"), Particle.ENCHANTMENT_TABLE, 0F, 0F, 0F, 0.01), location -> location.add(0, 1.1, 0)))), ENCHANTING_CIRCLE(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(WHITE_DYE, "PARTICLE_ENCHANTING_CIRCLE", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.ENCHANTMENT_TABLE, 0F, 0F, 0F, 0.01), location -> location.add(0, 1.1, 0)))),
NOTES_CIRCLE(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(NOTE_BLOCK, "PARTICLE_NOTES"), Particle.NOTE, 0F, 0F, 0F, 0.01), location -> location.add(0, 2.2, 0)))), NOTES_CIRCLE(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(NOTE_BLOCK, "PARTICLE_NOTES", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.NOTE, 0F, 0F, 0F, 0.01), location -> location.add(0, 2.2, 0)))),
WATER_FIRE(new LocationParticleMutator(new CircleParticle(new ParticleItem(GUARDIAN_SPAWN_EGG, "PARTICLE_WATER_FIRE"), new SimpleParticle(null, Particle.DRIP_WATER, 0.0F, 0.0F, 0.0F, 0.01), new SimpleParticle(null, Particle.DRIP_LAVA, 0.0F, 0.0F, 0.0F, 0.01)), location -> location.add(0, 1.1, 0))), WATER_FIRE(new LocationParticleMutator(new CircleParticle(new ParticleItem(GUARDIAN_SPAWN_EGG, "PARTICLE_WATER_FIRE", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), new SimpleParticle(null, Particle.DRIP_WATER, 0.0F, 0.0F, 0.0F, 0.01), new SimpleParticle(null, Particle.DRIP_LAVA, 0.0F, 0.0F, 0.0F, 0.01)), location -> location.add(0, 1.1, 0))),
MAGIC_ENCHANTING(new LocationParticleMutator(new CircleParticle(new ParticleItem(DIAMOND_SWORD, "PARTICLE_MAGIC_ENCHANTING"), new SimpleParticle(null, Particle.CRIT_MAGIC, 0.0F, 0.0F, 0.0F, 0.01), new SimpleParticle(null, Particle.ENCHANTMENT_TABLE, 0.0F, 0.0F, 0.0F, 0.01)), location -> location.add(0, 1.1, 0))), MAGIC_ENCHANTING(new LocationParticleMutator(new CircleParticle(new ParticleItem(DIAMOND_SWORD, "PARTICLE_MAGIC_ENCHANTING", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), new SimpleParticle(null, Particle.CRIT_MAGIC, 0.0F, 0.0F, 0.0F, 0.01), new SimpleParticle(null, Particle.ENCHANTMENT_TABLE, 0.0F, 0.0F, 0.0F, 0.01)), location -> location.add(0, 1.1, 0))),
MAGIC_CLOUD_CIRCLE(new CloudParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(GLOWSTONE_DUST, "PARTICLE_MAGIC"), Particle.CRIT_MAGIC), location -> location.add(0, 1.1, 0))))), MAGIC_CLOUD_CIRCLE(new CloudParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(GLOWSTONE_DUST, "PARTICLE_MAGIC", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.CRIT_MAGIC), location -> location.add(0, 1.1, 0))))),
FLAME_CLOUD_CIRCLE(new CloudParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(FIRE_CORAL, "PARTICLE_FLAME"), Particle.FLAME), location -> location.add(0, 1.1, 0))))), FLAME_CLOUD_CIRCLE(new CloudParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(FIRE_CORAL, "PARTICLE_FLAME", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.FLAME), location -> location.add(0, 1.1, 0))))),
FIREWORK_CLOUD_CIRCLE(new CloudParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(FIREWORK_ROCKET, "PARTICLE_FIREWORK"), Particle.FIREWORKS_SPARK), location -> location.add(0, 1.1, 0))))), FIREWORK_CLOUD_CIRCLE(new CloudParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(FIREWORK_ROCKET, "PARTICLE_FIREWORK", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.FIREWORKS_SPARK), location -> location.add(0, 1.1, 0))))),
WATER_CLOUD_CIRCLE(new CloudParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(CYAN_DYE, "PARTICLE_WATER"), Particle.WATER_WAKE), location -> location.add(0, 1.1, 0))))), WATER_CLOUD_CIRCLE(new CloudParticle(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(CYAN_DYE, "PARTICLE_WATER", "PARTICLE_UNLOCKED_BY_SERVER_TEAM"), Particle.WATER_WAKE), location -> location.add(0, 1.1, 0))))),
; ;
public static ParticleEnum[] particles = values(); public static ParticleEnum[] particles = values();
@Getter @Getter

Datei anzeigen

@ -32,16 +32,16 @@ import static org.bukkit.Material.*;
@AllArgsConstructor @AllArgsConstructor
public enum TeamParticle implements ParticleEnum { public enum TeamParticle implements ParticleEnum {
SQUID(new SimpleParticle(new ParticleItem(INK_SAC, "PARTICLE_SQUID"), Particle.SQUID_INK, 0.2F, 0.2F, 0.2F, 0.01)), SQUID(new SimpleParticle(new ParticleItem(INK_SAC, "PARTICLE_SQUID", "PARTICLE_UNLOCKED_BY_TEAM"), Particle.SQUID_INK, 0.2F, 0.2F, 0.2F, 0.01)),
BUBBLE(new SimpleParticle(new ParticleItem(TUBE_CORAL, "PARTICLE_BUBBLE"), Particle.BUBBLE_POP, 0.2F, 0.2F, 0.2F, 0.01)), BUBBLE(new SimpleParticle(new ParticleItem(TUBE_CORAL, "PARTICLE_BUBBLE", "PARTICLE_UNLOCKED_BY_TEAM"), Particle.BUBBLE_POP, 0.2F, 0.2F, 0.2F, 0.01)),
HONEY(new SimpleParticle(new ParticleItem(HONEY_BOTTLE, "PARTICLE_HONEY"), Particle.DRIPPING_HONEY, 0.2F, 0.2F, 0.2F, 1)), HONEY(new SimpleParticle(new ParticleItem(HONEY_BOTTLE, "PARTICLE_HONEY", "PARTICLE_UNLOCKED_BY_TEAM"), Particle.DRIPPING_HONEY, 0.2F, 0.2F, 0.2F, 1)),
NECTAR(new SimpleParticle(new ParticleItem(HONEYCOMB, "PARTICLE_NECTAR"), Particle.FALLING_NECTAR, 0.2F, 0.2F, 0.2F, 1)), NECTAR(new SimpleParticle(new ParticleItem(HONEYCOMB, "PARTICLE_NECTAR", "PARTICLE_UNLOCKED_BY_TEAM"), Particle.FALLING_NECTAR, 0.2F, 0.2F, 0.2F, 1)),
FIREWORK(new LocationParticleMutator(new NonFloorParticle(new SimpleParticle(new ParticleItem(FIRE_CHARGE, "PARTICLE_FIREWORK"), Particle.FIREWORKS_SPARK, 0.1F, 0.1F, 0.1F, 0.2, 2)), location -> location.subtract(0, -0.2, 0))), FIREWORK(new LocationParticleMutator(new NonFloorParticle(new SimpleParticle(new ParticleItem(FIRE_CHARGE, "PARTICLE_FIREWORK", "PARTICLE_UNLOCKED_BY_TEAM"), Particle.FIREWORKS_SPARK, 0.1F, 0.1F, 0.1F, 0.2, 2)), location -> location.subtract(0, -0.2, 0))),
DRAGON_BREATH(new SimpleParticle(new ParticleItem(Material.DRAGON_BREATH, "PARTICLE_DRAGON_BREATH"), Particle.DRAGON_BREATH, 1F, 0.2F, 1F, 0.01)), DRAGON_BREATH(new SimpleParticle(new ParticleItem(Material.DRAGON_BREATH, "PARTICLE_DRAGON_BREATH", "PARTICLE_UNLOCKED_BY_TEAM"), Particle.DRAGON_BREATH, 1F, 0.2F, 1F, 0.01)),
DAMAGE(new SimpleParticle(new ParticleItem(SPIDER_EYE, "PARTICLE_DAMAGE"), Particle.DAMAGE_INDICATOR, 0.2F, 0F, 0.2F, 0.01)), DAMAGE(new SimpleParticle(new ParticleItem(SPIDER_EYE, "PARTICLE_DAMAGE", "PARTICLE_UNLOCKED_BY_TEAM"), Particle.DAMAGE_INDICATOR, 0.2F, 0F, 0.2F, 0.01)),
DOLPHIN(new SimpleParticle(new ParticleItem(BLUE_DYE, "PARTICLE_DOLPHIN"), Particle.DOLPHIN, 0.2F, 0F, 0.2F, 0.01)), DOLPHIN(new SimpleParticle(new ParticleItem(BLUE_DYE, "PARTICLE_DOLPHIN", "PARTICLE_UNLOCKED_BY_TEAM"), Particle.DOLPHIN, 0.2F, 0F, 0.2F, 0.01)),
HEART(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(RED_CONCRETE, "PARTICLE_HEART"), Particle.HEART), location -> location.add(0, 2.2, 0)))) HEART(new CircleParticle(new LocationParticleMutator(new SimpleParticle(new ParticleItem(RED_CONCRETE, "PARTICLE_HEART", "PARTICLE_UNLOCKED_BY_TEAM"), Particle.HEART), location -> location.add(0, 2.2, 0)))),
; ;
public static ParticleEnum[] particles = values(); public static ParticleEnum[] particles = values();
@Getter @Getter

Datei anzeigen

@ -60,8 +60,8 @@ public class CircleParticle implements BaseParticle {
Vector vector = new Vector(1, 0, 0); Vector vector = new Vector(1, 0, 0);
vector.rotateAroundY(particleData.getDeg()); vector.rotateAroundY(particleData.getDeg());
particleData.withLocation(location.clone().add(vector)); ParticleData nData = particleData.withLocation(location.clone().add(vector));
particle.particle(particleData); particle.particle(nData);
if (particle2 == null) { if (particle2 == null) {
return; return;
@ -69,7 +69,7 @@ public class CircleParticle implements BaseParticle {
vector.setX(-vector.getX()); vector.setX(-vector.getX());
vector.setZ(-vector.getZ()); vector.setZ(-vector.getZ());
particleData.withLocation(location.clone().add(vector)); nData = particleData.withLocation(location.clone().add(vector));
particle2.particle(particleData); particle2.particle(nData);
} }
} }

Datei anzeigen

@ -53,7 +53,7 @@ public class CloudParticle implements BaseParticle {
particleData.getPlayer().removePotionEffect(PotionEffectType.SLOW_FALLING); particleData.getPlayer().removePotionEffect(PotionEffectType.SLOW_FALLING);
return; return;
} }
particleData.withLocation(particleData.getLocation().subtract(0, -0.2, 0)); ParticleData nData = particleData.withLocation(particleData.getLocation().subtract(0, -0.2, 0));
particle.particle(particleData); particle.particle(nData);
} }
} }

Datei anzeigen

@ -41,7 +41,7 @@ public class ParticleGroup implements BaseParticle {
@Override @Override
public void particle(ParticleData particleData) { public void particle(ParticleData particleData) {
for (BaseParticle particle : particles) { for (BaseParticle particle : particles) {
particle.particle(particleData.clone()); particle.particle(particleData.copy());
} }
} }
} }

Datei anzeigen

@ -48,7 +48,7 @@ public class LocationParticleMutator implements BaseParticle {
@Override @Override
public void particle(ParticleData particleData) { public void particle(ParticleData particleData) {
particleData.withLocation(mutator.apply(particleData.getLocation())); ParticleData nData = particleData.withLocation(mutator.apply(particleData.getLocation()));
particle.particle(particleData); particle.particle(nData);
} }
} }