Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 713aab8

Browse files
committed
Fixed backward compatibility on 1.12 for particles.
1 parent 4075c33 commit 713aab8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/java/com/massivecraft/factions/cmd/CmdSeeChunk.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ private void showPillar(Player player, World world, int blockX, int blockZ) {
124124
}
125125
if (useParticles) {
126126
if (P.p.useNonPacketParticles) {
127-
player.spawnParticle(Particle.REDSTONE, loc, 0, new Particle.DustOptions(Color.RED, 1));
127+
// Dust options only exists in the 1.13 API, so we use an
128+
// alternative method to achieve this in lower versions.
129+
if (P.p.mc113) {
130+
player.spawnParticle(Particle.REDSTONE, loc, 0, new Particle.DustOptions(Color.RED, 1));
131+
} else {
132+
player.getWorld().spawnParticle(Particle.REDSTONE, loc, 0, 255, 0, 0, 1);
133+
}
134+
128135
} else {
129136
this.effect.display(0, 0, 0, 0, 1, loc, player);
130137
}

0 commit comments

Comments
 (0)