From eacaa45dbe1672e50028428b4966264446bbc85e Mon Sep 17 00:00:00 2001 From: DerFrZocker Date: Mon, 29 May 2023 14:42:48 +0200 Subject: [PATCH] Convert Particle --- src/main/java/org/bukkit/Particle.java | 335 +++++++++++------- src/main/java/org/bukkit/Registry.java | 6 + src/main/java/org/bukkit/World.java | 28 +- .../org/bukkit/entity/AreaEffectCloud.java | 6 +- src/main/java/org/bukkit/entity/Player.java | 24 +- 5 files changed, 242 insertions(+), 157 deletions(-) diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java index 7336edb9..fcf285df 100644 --- a/src/main/java/org/bukkit/Particle.java +++ b/src/main/java/org/bukkit/Particle.java @@ -1,164 +1,144 @@ package org.bukkit; import com.google.common.base.Preconditions; +import com.google.common.collect.Lists; import org.bukkit.block.data.BlockData; import org.bukkit.inventory.ItemStack; -import org.bukkit.material.MaterialData; +import org.bukkit.util.OldEnum; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; -public enum Particle { - EXPLOSION_NORMAL, - EXPLOSION_LARGE, - EXPLOSION_HUGE, - FIREWORKS_SPARK, - WATER_BUBBLE, - WATER_SPLASH, - WATER_WAKE, - SUSPENDED, - SUSPENDED_DEPTH, - CRIT, - CRIT_MAGIC, - SMOKE_NORMAL, - SMOKE_LARGE, - SPELL, - SPELL_INSTANT, - SPELL_MOB, - SPELL_MOB_AMBIENT, - SPELL_WITCH, - DRIP_WATER, - DRIP_LAVA, - VILLAGER_ANGRY, - VILLAGER_HAPPY, - TOWN_AURA, - NOTE, - PORTAL, - ENCHANTMENT_TABLE, - FLAME, - LAVA, - CLOUD, +public abstract class Particle extends OldEnum> implements Keyed { + public static final Particle POOF = getParticle("poof"); + public static final Particle EXPLOSION = getParticle("explosion"); + public static final Particle EXPLOSION_EMITTER = getParticle("explosion_emitter"); + public static final Particle FIREWORK = getParticle("firework"); + public static final Particle BUBBLE = getParticle("bubble"); + public static final Particle SPLASH = getParticle("splash"); + public static final Particle FISHING = getParticle("fishing"); + public static final Particle UNDERWATER = getParticle("underwater"); + public static final Particle CRIT = getParticle("crit"); + public static final Particle ENCHANTED_HIT = getParticle("enchanted_hit"); + public static final Particle SMOKE = getParticle("smoke"); + public static final Particle LARGE_SMOKE = getParticle("large_smoke"); + public static final Particle EFFECT = getParticle("effect"); + public static final Particle INSTANT_EFFECT = getParticle("instant_effect"); + public static final Particle ENTITY_EFFECT = getParticle("entity_effect"); + public static final Particle AMBIENT_ENTITY_EFFECT = getParticle("ambient_entity_effect"); + public static final Particle WITCH = getParticle("witch"); + public static final Particle DRIPPING_WATER = getParticle("dripping_water"); + public static final Particle DRIPPING_LAVA = getParticle("dripping_lava"); + public static final Particle ANGRY_VILLAGER = getParticle("angry_villager"); + public static final Particle HAPPY_VILLAGER = getParticle("happy_villager"); + public static final Particle MYCELIUM = getParticle("mycelium"); + public static final Particle NOTE = getParticle("note"); + public static final Particle PORTAL = getParticle("portal"); + public static final Particle ENCHANT = getParticle("enchant"); + public static final Particle FLAME = getParticle("flame"); + public static final Particle LAVA = getParticle("lava"); + public static final Particle CLOUD = getParticle("cloud"); /** * Uses {@link Particle.DustOptions} as DataType */ - REDSTONE(DustOptions.class), - SNOWBALL, - SNOW_SHOVEL, - SLIME, - HEART, + public static final Particle DUST = getParticle("dust"); + public static final Particle ITEM_SNOWBALL = getParticle("item_snowball"); + public static final Particle ITEM_SLIME = getParticle("item_slime"); + public static final Particle HEART = getParticle("heart"); /** * Uses {@link ItemStack} as DataType */ - ITEM_CRACK(ItemStack.class), + public static final Particle ITEM = getParticle("item"); /** * Uses {@link BlockData} as DataType */ - BLOCK_CRACK(BlockData.class), + public static final Particle BLOCK = getParticle("block"); + public static final Particle RAIN = getParticle("rain"); + public static final Particle ELDER_GUARDIAN = getParticle("elder_guardian"); + public static final Particle DRAGON_BREATH = getParticle("dragon_breath"); + public static final Particle END_ROD = getParticle("end_rod"); + public static final Particle DAMAGE_INDICATOR = getParticle("damage_indicator"); + public static final Particle SWEEP_ATTACK = getParticle("sweep_attack"); /** * Uses {@link BlockData} as DataType */ - BLOCK_DUST(BlockData.class), - WATER_DROP, - MOB_APPEARANCE, - DRAGON_BREATH, - END_ROD, - DAMAGE_INDICATOR, - SWEEP_ATTACK, - /** - * Uses {@link BlockData} as DataType - */ - FALLING_DUST(BlockData.class), - TOTEM, - SPIT, - SQUID_INK, - BUBBLE_POP, - CURRENT_DOWN, - BUBBLE_COLUMN_UP, - NAUTILUS, - DOLPHIN, - SNEEZE, - CAMPFIRE_COSY_SMOKE, - CAMPFIRE_SIGNAL_SMOKE, - COMPOSTER, - FLASH, - FALLING_LAVA, - LANDING_LAVA, - FALLING_WATER, - DRIPPING_HONEY, - FALLING_HONEY, - LANDING_HONEY, - FALLING_NECTAR, - SOUL_FIRE_FLAME, - ASH, - CRIMSON_SPORE, - WARPED_SPORE, - SOUL, - DRIPPING_OBSIDIAN_TEAR, - FALLING_OBSIDIAN_TEAR, - LANDING_OBSIDIAN_TEAR, - REVERSE_PORTAL, - WHITE_ASH, + public static final Particle FALLING_DUST = getParticle("falling_dust"); + public static final Particle TOTEM_OF_UNDYING = getParticle("totem_of_undying"); + public static final Particle SPIT = getParticle("spit"); + public static final Particle SQUID_INK = getParticle("squid_ink"); + public static final Particle BUBBLE_POP = getParticle("bubble_pop"); + public static final Particle CURRENT_DOWN = getParticle("current_down"); + public static final Particle BUBBLE_COLUMN_UP = getParticle("bubble_column_up"); + public static final Particle NAUTILUS = getParticle("nautilus"); + public static final Particle DOLPHIN = getParticle("dolphin"); + public static final Particle SNEEZE = getParticle("sneeze"); + public static final Particle CAMPFIRE_COSY_SMOKE = getParticle("campfire_cosy_smoke"); + public static final Particle CAMPFIRE_SIGNAL_SMOKE = getParticle("campfire_signal_smoke"); + public static final Particle COMPOSTER = getParticle("composter"); + public static final Particle FLASH = getParticle("flash"); + public static final Particle FALLING_LAVA = getParticle("falling_lava"); + public static final Particle LANDING_LAVA = getParticle("landing_lava"); + public static final Particle FALLING_WATER = getParticle("falling_water"); + public static final Particle DRIPPING_HONEY = getParticle("dripping_honey"); + public static final Particle FALLING_HONEY = getParticle("falling_honey"); + public static final Particle LANDING_HONEY = getParticle("landing_honey"); + public static final Particle FALLING_NECTAR = getParticle("falling_nectar"); + public static final Particle SOUL_FIRE_FLAME = getParticle("soul_fire_flame"); + public static final Particle ASH = getParticle("ash"); + public static final Particle CRIMSON_SPORE = getParticle("crimson_spore"); + public static final Particle WARPED_SPORE = getParticle("warped_spore"); + public static final Particle SOUL = getParticle("soul"); + public static final Particle DRIPPING_OBSIDIAN_TEAR = getParticle("dripping_obsidian_tear"); + public static final Particle FALLING_OBSIDIAN_TEAR = getParticle("falling_obsidian_tear"); + public static final Particle LANDING_OBSIDIAN_TEAR = getParticle("landing_obsidian_tear"); + public static final Particle REVERSE_PORTAL = getParticle("reverse_portal"); + public static final Particle WHITE_ASH = getParticle("white_ash"); /** * Uses {@link DustTransition} as DataType */ - DUST_COLOR_TRANSITION(DustTransition.class), + public static final Particle DUST_COLOR_TRANSITION = getParticle("dust_color_transition"); /** * Uses {@link Vibration} as DataType */ - VIBRATION(Vibration.class), - FALLING_SPORE_BLOSSOM, - SPORE_BLOSSOM_AIR, - SMALL_FLAME, - SNOWFLAKE, - DRIPPING_DRIPSTONE_LAVA, - FALLING_DRIPSTONE_LAVA, - DRIPPING_DRIPSTONE_WATER, - FALLING_DRIPSTONE_WATER, - GLOW_SQUID_INK, - GLOW, - WAX_ON, - WAX_OFF, - ELECTRIC_SPARK, - SCRAPE, - SONIC_BOOM, - SCULK_SOUL, - SCULK_CHARGE(Float.class), - SCULK_CHARGE_POP, - SHRIEK(Integer.class), + public static final Particle VIBRATION = getParticle("vibration"); + public static final Particle FALLING_SPORE_BLOSSOM = getParticle("falling_spore_blossom"); + public static final Particle SPORE_BLOSSOM_AIR = getParticle("spore_blossom_air"); + public static final Particle SMALL_FLAME = getParticle("small_flame"); + public static final Particle SNOWFLAKE = getParticle("snowflake"); + public static final Particle DRIPPING_DRIPSTONE_LAVA = getParticle("dripping_dripstone_lava"); + public static final Particle FALLING_DRIPSTONE_LAVA = getParticle("falling_dripstone_lava"); + public static final Particle DRIPPING_DRIPSTONE_WATER = getParticle("dripping_dripstone_water"); + public static final Particle FALLING_DRIPSTONE_WATER = getParticle("falling_dripstone_water"); + public static final Particle GLOW_SQUID_INK = getParticle("glow_squid_ink"); + public static final Particle GLOW = getParticle("glow"); + public static final Particle WAX_ON = getParticle("wax_on"); + public static final Particle WAX_OFF = getParticle("wax_off"); + public static final Particle ELECTRIC_SPARK = getParticle("electric_spark"); + public static final Particle SCRAPE = getParticle("scrape"); + public static final Particle SONIC_BOOM = getParticle("sonic_boom"); + public static final Particle SCULK_SOUL = getParticle("sculk_soul"); + public static final Particle SCULK_CHARGE = getParticle("sculk_charge"); + public static final Particle SCULK_CHARGE_POP = getParticle("sculk_charge_pop"); + public static final Particle SHRIEK = getParticle("shriek"); @MinecraftExperimental @ApiStatus.Experimental - DRIPPING_CHERRY_LEAVES, + public static final Particle DRIPPING_CHERRY_LEAVES = getParticle("dripping_cherry_leaves"); @MinecraftExperimental @ApiStatus.Experimental - FALLING_CHERRY_LEAVES, + public static final Particle FALLING_CHERRY_LEAVES = getParticle("falling_cherry_leaves"); @MinecraftExperimental @ApiStatus.Experimental - LANDING_CHERRY_LEAVES, + public static final Particle LANDING_CHERRY_LEAVES = getParticle("landing_cherry_leaves"); /** * Uses {@link BlockData} as DataType */ - BLOCK_MARKER(BlockData.class), - // ----- Legacy Separator ----- - /** - * Uses {@link MaterialData} as DataType - */ - LEGACY_BLOCK_CRACK(MaterialData.class), - /** - * Uses {@link MaterialData} as DataType - */ - LEGACY_BLOCK_DUST(MaterialData.class), - /** - * Uses {@link MaterialData} as DataType - */ - LEGACY_FALLING_DUST(MaterialData.class); + public static final Particle BLOCK_MARKER = getParticle("block_marker"); - private final Class dataType; - - Particle() { - dataType = Void.class; - } - - Particle(/*@NotNull*/ Class data) { - dataType = data; + @NotNull + private static Particle getParticle(@NotNull String key) { + NamespacedKey namespacedKey = NamespacedKey.minecraft(key); + Particle particle = Registry.PARTICLE_TYPE.get(namespacedKey); + Preconditions.checkNotNull(particle, "No particle found for %s. This is a bug.", namespacedKey); + return particle; } /** @@ -166,9 +146,7 @@ public enum Particle { * @return the required data type */ @NotNull - public Class getDataType() { - return dataType; - } + public abstract Class getDataType(); /** * Options which can be applied to redstone dust particles - a particle @@ -229,4 +207,105 @@ public enum Particle { return toColor; } } + + /** + * @param name of the particle. + * @return the particle with the given name. + * @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead. + */ + @NotNull + @Deprecated + public static Particle valueOf(@NotNull String name) { + name = convertLegacy(name); + Particle particle = Registry.PARTICLE_TYPE.get(NamespacedKey.fromString(name.toLowerCase())); + Preconditions.checkArgument(particle != null, "No particle found with the name %s", name); + return particle; + } + + /** + * @return an array of all known particles. + * @deprecated use {@link Registry#iterator()}. + */ + @NotNull + @Deprecated + public static Particle[] values() { + return Lists.newArrayList(Registry.PARTICLE_TYPE).toArray(new Particle[0]); + } + + private static String convertLegacy(String from) { + if (from == null) { + return null; + } + + switch (from.toLowerCase()) { + case "explosion_normal": + return "poof"; + case "explosion_large": + return "explosion"; + case "explosion_huge": + return "explosion_emitter"; + case "fireworks_spark": + return "firework"; + case "water_bubble": + return "bubble"; + case "water_splash": + return "splash"; + case "water_wake": + return "fishing"; + case "suspended": + return "underwater"; + case "suspended_depth": + return "underwater"; + case "crit_magic": + return "enchanted_hit"; + case "smoke_normal": + return "smoke"; + case "smoke_large": + return "large_smoke"; + case "spell": + return "effect"; + case "spell_instant": + return "instant_effect"; + case "spell_mob": + return "entity_effect"; + case "spell_mob_ambient": + return "ambient_entity_effect"; + case "spell_witch": + return "witch"; + case "drip_water": + return "dripping_water"; + case "drip_lava": + return "dripping_lava"; + case "villager_angry": + return "angry_villager"; + case "villager_happy": + return "happy_villager"; + case "town_aura": + return "mycelium"; + case "enchantment_table": + return "enchant"; + case "redstone": + return "dust"; + case "snowball": + return "item_snowball"; + case "snow_shovel": + return "item_snowball"; + case "slime": + return "item_slime"; + case "item_crack": + return "item"; + case "block_crack": + return "block"; + case "block_dust": + return "block"; + case "water_drop": + return "rain"; + case "mob_appearance": + return "elder_guardian"; + case "totem": + return "totem_of_undying"; + } + + return from; + } } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java index 2c19010f..6da99bf0 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -146,6 +146,12 @@ public interface Registry extends Iterable { */ @Deprecated Registry MATERIAL = new SimpleRegistry<>(Material.class, (mat) -> !mat.isLegacy()); + /** + * Server particle types. + * + * @see Particle + */ + Registry PARTICLE_TYPE = Objects.requireNonNull(Bukkit.getRegistry(Particle.class), "No registry present for Particle. This is a bug."); /** * Server statistics. * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index 942ae61a..87bb2beb 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -2278,7 +2278,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param location the location to spawn at * @param count the number of particles */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count); /** * Spawns the particle (the number of times specified by count) @@ -2290,7 +2290,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param z the position on the z axis to spawn at * @param count the number of particles */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count); /** * Spawns the particle (the number of times specified by count) @@ -2303,7 +2303,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); /** @@ -2319,7 +2319,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); /** * Spawns the particle (the number of times specified by count) @@ -2334,7 +2334,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param offsetY the maximum random offset on the Y axis * @param offsetZ the maximum random offset on the Z axis */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ); /** * Spawns the particle (the number of times specified by count) @@ -2351,7 +2351,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param offsetY the maximum random offset on the Y axis * @param offsetZ the maximum random offset on the Z axis */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ); /** * Spawns the particle (the number of times specified by count) @@ -2369,7 +2369,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); /** * Spawns the particle (the number of times specified by count) @@ -2389,7 +2389,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); /** * Spawns the particle (the number of times specified by count) @@ -2406,7 +2406,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param extra the extra data for this particle, depends on the * particle used (normally speed) */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra); /** * Spawns the particle (the number of times specified by count) @@ -2425,7 +2425,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param extra the extra data for this particle, depends on the * particle used (normally speed) */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra); /** * Spawns the particle (the number of times specified by count) @@ -2445,7 +2445,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); /** * Spawns the particle (the number of times specified by count) @@ -2467,7 +2467,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); /** * Spawns the particle (the number of times specified by count) @@ -2490,7 +2490,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * range and encourage their client to render it regardless of * settings */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force); /** * Spawns the particle (the number of times specified by count) @@ -2515,7 +2515,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * range and encourage their client to render it regardless of * settings */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force); /** * Find the closest nearby structure of a given {@link StructureType}. diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java index c2096b53..d145db6b 100644 --- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java +++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java @@ -126,14 +126,14 @@ public interface AreaEffectCloud extends Entity { * @return particle the set particle type */ @NotNull - Particle getParticle(); + Particle getParticle(); /** * Sets the particle which this cloud will be composed of * * @param particle the new particle type */ - void setParticle(@NotNull Particle particle); + void setParticle(@NotNull Particle particle); /** * Sets the particle which this cloud will be composed of @@ -143,7 +143,7 @@ public interface AreaEffectCloud extends Entity { * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - void setParticle(@NotNull Particle particle, @Nullable T data); + void setParticle(@NotNull Particle particle, @Nullable T data); /** * Sets the underlying potion data diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index d757f67f..f7406cbc 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1445,7 +1445,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param location the location to spawn at * @param count the number of particles */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count); /** * Spawns the particle (the number of times specified by count) @@ -1457,7 +1457,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param z the position on the z axis to spawn at * @param count the number of particles */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count); /** * Spawns the particle (the number of times specified by count) @@ -1470,7 +1470,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data); /** @@ -1486,7 +1486,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data); /** * Spawns the particle (the number of times specified by count) @@ -1501,7 +1501,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param offsetY the maximum random offset on the Y axis * @param offsetZ the maximum random offset on the Z axis */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ); /** * Spawns the particle (the number of times specified by count) @@ -1518,7 +1518,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param offsetY the maximum random offset on the Y axis * @param offsetZ the maximum random offset on the Z axis */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ); /** * Spawns the particle (the number of times specified by count) @@ -1536,7 +1536,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); /** * Spawns the particle (the number of times specified by count) @@ -1556,7 +1556,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data); /** * Spawns the particle (the number of times specified by count) @@ -1573,7 +1573,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param extra the extra data for this particle, depends on the * particle used (normally speed) */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra); /** * Spawns the particle (the number of times specified by count) @@ -1592,7 +1592,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param extra the extra data for this particle, depends on the * particle used (normally speed) */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra); /** * Spawns the particle (the number of times specified by count) @@ -1612,7 +1612,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); /** * Spawns the particle (the number of times specified by count) @@ -1634,7 +1634,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ - public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); + public void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data); /** * Return the player's progression on the specified advancement.