mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-08-07 04:53:04 +00:00
Merge branch 'master' into version-compat
This commit is contained in:
parent
9567b06e23
commit
a82b4d125e
93 changed files with 1496 additions and 698 deletions
|
@ -8,6 +8,7 @@ import dev.esophose.playerparticles.particles.ParticlePair;
|
|||
import dev.esophose.playerparticles.PlayerParticles;
|
||||
import dev.esophose.playerparticles.config.CommentedFileConfiguration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -43,6 +44,11 @@ public class ParticleStyleBlockPlace extends DefaultParticleStyle implements Lis
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getGuiIconMaterialNames() {
|
||||
return Arrays.asList("OAK_PLANKS", "WOOD");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDefaultSettings(CommentedFileConfiguration config) {
|
||||
this.setIfNotExists("particle-amount", 10, "The number of particles to spawn");
|
||||
|
@ -63,11 +69,12 @@ public class ParticleStyleBlockPlace extends DefaultParticleStyle implements Lis
|
|||
|
||||
Player player = event.getPlayer();
|
||||
PPlayer pplayer = PlayerParticles.getInstance().getManager(DataManager.class).getPPlayer(player.getUniqueId());
|
||||
if (pplayer != null) {
|
||||
for (ParticlePair particle : pplayer.getActiveParticlesForStyle(DefaultStyles.BLOCKPLACE)) {
|
||||
Location loc = event.getBlock().getLocation().clone();
|
||||
particleManager.displayParticles(player, player.getWorld(), particle, DefaultStyles.BLOCKPLACE.getParticles(particle, loc), false);
|
||||
}
|
||||
if (pplayer == null)
|
||||
return;
|
||||
|
||||
for (ParticlePair particle : pplayer.getActiveParticlesForStyle(DefaultStyles.BLOCKPLACE)) {
|
||||
Location loc = event.getBlock().getLocation().clone();
|
||||
particleManager.displayParticles(pplayer, player.getWorld(), particle, DefaultStyles.BLOCKPLACE.getParticles(particle, loc), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue