mirror of
https://github.com/darksaid98/nightcore-spigot.git
synced 2026-12-01 14:38:47 +00:00
Merge pull request #45 from Hikari16665/master
Fix UniParticle.redstone version-checking logic
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -154,6 +154,10 @@ public enum Version {
|
||||
return getCurrent().isLower(version);
|
||||
}
|
||||
|
||||
public static boolean isBehindOrEqual(@NotNull Version version){
|
||||
return getCurrent().isLower(version) || getCurrent() == version;
|
||||
}
|
||||
|
||||
public boolean isCurrent() {
|
||||
return this == Version.getCurrent();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class UniParticle implements Writeable {
|
||||
|
||||
@NotNull
|
||||
public static UniParticle redstone(@NotNull Color color, float size) {
|
||||
Particle var = Version.isBehind(Version.MC_1_21_3) ? Particle.valueOf("REDSTONE") : BukkitThing.getParticle("dust");
|
||||
Particle var = Version.isBehindOrEqual(Version.V1_20_R3) ? Particle.valueOf("REDSTONE") : BukkitThing.getParticle("dust");
|
||||
return new UniParticle(var, new Particle.DustOptions(color, size));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user