Dieser Commit ist enthalten in:
Ursprung
86612ef7f2
Commit
94c6fc934b
@ -16,6 +16,9 @@ PARTICLE_INVENTORY = §6Partikel
|
||||
PARTICLE_DESELECT = §8Keine Partikel
|
||||
PARTICLE_LOCKED = {0} §8- §c§lGesperrt
|
||||
|
||||
PARTICLE_UNLOCKED_BY_TEAM = §eTeam Beitritt
|
||||
PARTICLE_UNLOCKED_BY_SERVER_TEAM = §eServer Team
|
||||
|
||||
PARTICLE_ATTRIBUTE_CIRCLE = §8-§f Ring
|
||||
PARTICLE_ATTRIBUTE_BI_CIRCLE = §8-§f Doppel Ring
|
||||
PARTICLE_ATTRIBUTE_CLOUD = §8-§f Wolke
|
||||
@ -60,3 +63,17 @@ PARTICLE_TOWN = §5Town
|
||||
PARTICLE_ENCHANTING_CIRCLE = §fEnchanted
|
||||
PARTICLE_WATER_FIRE = §bWater§7/§cFire
|
||||
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
|
||||
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
|
@ -21,15 +21,30 @@ package de.steamwar.lobby.particle;
|
||||
|
||||
import de.steamwar.lobby.particle.decorator.CircleParticle;
|
||||
import de.steamwar.lobby.particle.decorator.CloudParticle;
|
||||
import org.bukkit.Material;
|
||||
import de.steamwar.lobby.particle.mutator.LocationParticleMutator;
|
||||
import org.bukkit.Particle;
|
||||
|
||||
import static org.bukkit.Material.*;
|
||||
|
||||
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)),
|
||||
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)),
|
||||
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)),
|
||||
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));
|
||||
WarGearSeason(22, new int[]{12, 285, 54},
|
||||
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)))),
|
||||
new SimpleParticle(new ParticleItem(BOOK, "PARTICLE_EVENT_ENCHANTING", "PARTICLE_UNLOCKED_BY_WGS"), Particle.ENCHANTMENT_TABLE)
|
||||
),
|
||||
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();
|
||||
|
||||
|
@ -36,8 +36,9 @@ public class ParticleData {
|
||||
private final double deg;
|
||||
|
||||
public ParticleData withLocation(Location location) {
|
||||
this.location = location;
|
||||
return this;
|
||||
ParticleData particleData = copy();
|
||||
particleData.location = location;
|
||||
return particleData;
|
||||
}
|
||||
|
||||
public Location getLocation() {
|
||||
@ -47,7 +48,7 @@ public class ParticleData {
|
||||
return location;
|
||||
}
|
||||
|
||||
public ParticleData clone() {
|
||||
public ParticleData copy() {
|
||||
return new ParticleData(world, player, location, deg);
|
||||
}
|
||||
}
|
||||
|
@ -67,18 +67,18 @@ public class ParticleInventory {
|
||||
boolean clickablePlacement = userGroup.isTeamGroup();
|
||||
clickablePlacement |= (steamwarUser.getTeam() != 0 && contains(eventParticle.placementTeams, steamwarUser.getTeam()));
|
||||
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 {
|
||||
SWItem swItem = eventParticle.placementParticle.getItem();
|
||||
swItem.setName(swItem.getItemMeta().getDisplayName() + " §8- §c§lGesperrt");
|
||||
SWItem swItem = eventParticle.placementParticle.getItem().toSWItem(player);
|
||||
swItem.setName(LobbySystem.getMessage().parse("PARTICLE_LOCKED", player, swItem.getItemMeta().getDisplayName()));
|
||||
particleList.add(new SWListInv.SWListEntry<>(swItem, null));
|
||||
}
|
||||
|
||||
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 {
|
||||
SWItem swItem = eventParticle.participationParticles.getItem();
|
||||
swItem.setName(swItem.getItemMeta().getDisplayName() + " §8- §c§lGesperrt");
|
||||
SWItem swItem = eventParticle.participationParticles.getItem().toSWItem(player);
|
||||
swItem.setName(LobbySystem.getMessage().parse("PARTICLE_LOCKED", player, swItem.getItemMeta().getDisplayName()));
|
||||
particleList.add(new SWListInv.SWListEntry<>(swItem, null));
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ package de.steamwar.lobby.particle;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
import de.steamwar.lobby.LobbySystem;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -37,10 +36,14 @@ public class ParticleItem {
|
||||
private final Material material;
|
||||
private final String name;
|
||||
private final Set<String> attributes = new LinkedHashSet<>();
|
||||
|
||||
@Setter
|
||||
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) {
|
||||
this.attributes.add(attribute);
|
||||
return this;
|
||||
|
@ -32,28 +32,28 @@ import static org.bukkit.Material.*;
|
||||
@AllArgsConstructor
|
||||
public enum ServerTeamParticle implements ParticleEnum {
|
||||
|
||||
WITCH(new SimpleParticle(new ParticleItem(EXPERIENCE_BOTTLE, "PARTICLE_WITCH"), Particle.SPELL_WITCH)),
|
||||
ENCHANTING(new SimpleParticle(new ParticleItem(ENCHANTING_TABLE, "PARTICLE_ENCHANTING"), Particle.ENCHANTMENT_TABLE)),
|
||||
HAPPY(new SimpleParticle(new ParticleItem(EMERALD_BLOCK, "PARTICLE_HAPPY"), 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)),
|
||||
END_ROD(new SimpleParticle(new ParticleItem(Material.END_ROD, "PARTICLE_END_ROD"), Particle.END_ROD, 0.2F, 0.2F, 0.2F, 0.01)),
|
||||
CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(WHITE_WOOL, "PARTICLE_CLOUD"), Particle.CLOUD))),
|
||||
TOTEM(new CloudParticle(new SimpleParticle(new ParticleItem(TOTEM_OF_UNDYING, "PARTICLE_TOTEM"), Particle.TOTEM))),
|
||||
ENCHANTING_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(WHITE_DYE, "PARTICLE_ENCHANTING"), Particle.ENCHANTMENT_TABLE))),
|
||||
FLAME_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(FIRE_CORAL_BLOCK, "PARTICLE_FLAME"), Particle.FLAME))),
|
||||
SNEEZE_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(LIME_SHULKER_BOX, "PARTICLE_SNEEZE"), Particle.SNEEZE))),
|
||||
SLIME_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(GREEN_SHULKER_BOX, "PARTICLE_SLIME"), Particle.SLIME))),
|
||||
SMOKE_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(DEAD_BRAIN_CORAL_BLOCK, "PARTICLE_SMOKE"), Particle.CAMPFIRE_COSY_SMOKE))),
|
||||
TOWN_CLOUD(new CloudParticle(new SimpleParticle(new ParticleItem(FIREWORK_STAR, "PARTICLE_TOWN"), 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)))),
|
||||
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)))),
|
||||
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)))),
|
||||
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))),
|
||||
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_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))))),
|
||||
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))))),
|
||||
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))))),
|
||||
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))))),
|
||||
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_UNLOCKED_BY_SERVER_TEAM"), Particle.ENCHANTMENT_TABLE)),
|
||||
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_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_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_UNLOCKED_BY_SERVER_TEAM"), Particle.CLOUD))),
|
||||
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_UNLOCKED_BY_SERVER_TEAM"), Particle.ENCHANTMENT_TABLE))),
|
||||
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_UNLOCKED_BY_SERVER_TEAM"), Particle.SNEEZE))),
|
||||
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_UNLOCKED_BY_SERVER_TEAM"), Particle.CAMPFIRE_COSY_SMOKE))),
|
||||
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_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_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_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", "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", "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_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_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_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_UNLOCKED_BY_SERVER_TEAM"), Particle.WATER_WAKE), location -> location.add(0, 1.1, 0))))),
|
||||
;
|
||||
public static ParticleEnum[] particles = values();
|
||||
|
||||
|
@ -32,15 +32,15 @@ import static org.bukkit.Material.*;
|
||||
@AllArgsConstructor
|
||||
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)),
|
||||
BUBBLE(new SimpleParticle(new ParticleItem(TUBE_CORAL, "PARTICLE_BUBBLE"), 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)),
|
||||
NECTAR(new SimpleParticle(new ParticleItem(HONEYCOMB, "PARTICLE_NECTAR"), 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))),
|
||||
DRAGON_BREATH(new SimpleParticle(new ParticleItem(Material.DRAGON_BREATH, "PARTICLE_DRAGON_BREATH"), 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)),
|
||||
DOLPHIN(new SimpleParticle(new ParticleItem(BLUE_DYE, "PARTICLE_DOLPHIN"), 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))))
|
||||
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_UNLOCKED_BY_TEAM"), Particle.BUBBLE_POP, 0.2F, 0.2F, 0.2F, 0.01)),
|
||||
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_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_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_UNLOCKED_BY_TEAM"), Particle.DRAGON_BREATH, 1F, 0.2F, 1F, 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_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_UNLOCKED_BY_TEAM"), Particle.HEART), location -> location.add(0, 2.2, 0)))),
|
||||
;
|
||||
public static ParticleEnum[] particles = values();
|
||||
|
||||
|
@ -60,8 +60,8 @@ public class CircleParticle implements BaseParticle {
|
||||
|
||||
Vector vector = new Vector(1, 0, 0);
|
||||
vector.rotateAroundY(particleData.getDeg());
|
||||
particleData.withLocation(location.clone().add(vector));
|
||||
particle.particle(particleData);
|
||||
ParticleData nData = particleData.withLocation(location.clone().add(vector));
|
||||
particle.particle(nData);
|
||||
|
||||
if (particle2 == null) {
|
||||
return;
|
||||
@ -69,7 +69,7 @@ public class CircleParticle implements BaseParticle {
|
||||
vector.setX(-vector.getX());
|
||||
vector.setZ(-vector.getZ());
|
||||
|
||||
particleData.withLocation(location.clone().add(vector));
|
||||
particle2.particle(particleData);
|
||||
nData = particleData.withLocation(location.clone().add(vector));
|
||||
particle2.particle(nData);
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class CloudParticle implements BaseParticle {
|
||||
particleData.getPlayer().removePotionEffect(PotionEffectType.SLOW_FALLING);
|
||||
return;
|
||||
}
|
||||
particleData.withLocation(particleData.getLocation().subtract(0, -0.2, 0));
|
||||
particle.particle(particleData);
|
||||
ParticleData nData = particleData.withLocation(particleData.getLocation().subtract(0, -0.2, 0));
|
||||
particle.particle(nData);
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public class ParticleGroup implements BaseParticle {
|
||||
@Override
|
||||
public void particle(ParticleData particleData) {
|
||||
for (BaseParticle particle : particles) {
|
||||
particle.particle(particleData.clone());
|
||||
particle.particle(particleData.copy());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public class LocationParticleMutator implements BaseParticle {
|
||||
|
||||
@Override
|
||||
public void particle(ParticleData particleData) {
|
||||
particleData.withLocation(mutator.apply(particleData.getLocation()));
|
||||
particle.particle(particleData);
|
||||
ParticleData nData = particleData.withLocation(mutator.apply(particleData.getLocation()));
|
||||
particle.particle(nData);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren