Added GUI's

Added player settings
Added commands
This commit is contained in:
2022-01-11 23:02:04 +01:00
parent 71c5b76d88
commit bc74d35faa
27 changed files with 750 additions and 21 deletions
@@ -0,0 +1,37 @@
package com.alttd.objects;
import com.alttd.AltitudeParticles;
import com.alttd.frameSpawners.FrameSpawnerLocation;
import com.alttd.frameSpawners.FrameSpawnerPlayer;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import java.util.List;
public class ParticleSet {
List<Frame> frames;
int delay, repeat;
APartType particlesType;
boolean shouldRepeat;
int ticksUntilNextFrame;
public ParticleSet(List<Frame> frames, int delay, int repeat, APartType particlesType) {
this.frames = frames;
this.delay = delay;
this.repeat = repeat;
this.particlesType = particlesType;
this.shouldRepeat = repeat < 0;
ticksUntilNextFrame = delay;
}
public void run(Location location) {
FrameSpawnerLocation frameSpawnerLocation = new FrameSpawnerLocation(repeat, frames, location);
frameSpawnerLocation.runTaskTimerAsynchronously(AltitudeParticles.getInstance(), 0, delay);
}
public void run(Player player) {
FrameSpawnerPlayer frameSpawnerPlayer = new FrameSpawnerPlayer(repeat, frames, player);
frameSpawnerPlayer.runTaskTimerAsynchronously(AltitudeParticles.getInstance(), 0, delay);
}
}