Skip to content

Commit 6784289

Browse files
committed
feat: Add "wait-time"
1 parent 4f96bfd commit 6784289

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/main/java/com/nisovin/magicspells/spelleffects/effecttypes/ParticleCloudEffect.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
public class ParticleCloudEffect extends ParticlesEffect {
1717

1818
private ConfigData<Integer> duration;
19+
private ConfigData<Integer> waitTime;
1920

2021
private ConfigData<Float> radius;
2122
private ConfigData<Float> yOffset;
@@ -28,6 +29,7 @@ public void loadFromConfig(ConfigurationSection config) {
2829
ConfigData<Integer> color = ConfigDataUtil.getInteger(config, "color", 0xFF0000);
2930
argbColor = argbColor.orDefault(data -> Color.fromRGB(color.get(data)));
3031

32+
waitTime = ConfigDataUtil.getInteger(config, "wait-time", 0);
3133
duration = ConfigDataUtil.getInteger(config, "duration", 60);
3234

3335
radius = ConfigDataUtil.getFloat(config, "radius", 5);
@@ -46,6 +48,7 @@ public Runnable playEffectLocation(Location location, SpellData data) {
4648
if (particle == null) return null;
4749

4850
location.getWorld().spawn(location.clone().add(0, yOffset.get(data), 0), AreaEffectCloud.class, cloud -> {
51+
cloud.setWaitTime(waitTime.get(data));
4952
cloud.setRadius(radius.get(data));
5053
cloud.setDuration(duration.get(data));
5154
cloud.setRadiusPerTick(radiusPerTick.get(data));

0 commit comments

Comments
 (0)