Skip to content

Commit 7b726b0

Browse files
committed
Ignore legacy particles
1 parent df53022 commit 7b726b0

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/main/java/com/laytonsmith/abstraction/enums/bukkit/BukkitMCParticle.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static void build() {
5353
if(v.existsIn(Static.getServer().getMinecraftVersion())) {
5454
Particle type;
5555
try {
56-
type = getBukkitType(v);
56+
type = Particle.valueOf(v.name());
5757
} catch (IllegalArgumentException | NoSuchFieldError ex) {
5858
MSLog.GetLogger().w(MSLog.Tags.RUNTIME, "Could not find a Bukkit Particle for " + v.name(), Target.UNKNOWN);
5959
continue;
@@ -64,7 +64,7 @@ public static void build() {
6464
}
6565
}
6666
for(Particle p : Particle.values()) {
67-
if(!BUKKIT_MAP.containsKey(p)) {
67+
if(!p.name().startsWith("LEGACY_") && !BUKKIT_MAP.containsKey(p)) {
6868
MSLog.GetLogger().w(Tags.GENERAL, "Could not find MCParticle for " + p.name(), Target.UNKNOWN);
6969
MCParticle wrapper = new BukkitMCParticle(MCVanillaParticle.UNKNOWN, p);
7070
MAP.put(p.name(), wrapper);
@@ -73,11 +73,6 @@ public static void build() {
7373
}
7474
}
7575

76-
private static Particle getBukkitType(MCVanillaParticle v) {
77-
// remap name changes
78-
return Particle.valueOf(v.name());
79-
}
80-
8176
public Object getParticleData(MCLocation l, Object data) {
8277
switch(getAbstracted()) {
8378
case BLOCK_DUST:

0 commit comments

Comments
 (0)