Use int for particle packets, add check for more effects

This commit is contained in:
HappyPikachu 2015-02-15 10:45:23 -05:00
parent e5dafd790f
commit 6ced514a1d
2 changed files with 52 additions and 44 deletions

View File

@ -9,52 +9,52 @@ import org.bukkit.entity.Player;
public enum Eff_1_8_R1 {
EXPLOSION("0"),
EXPLOSION_LARGE("1"),
EXPLOSION_HUGE("2"),
FIREWORKS_SPARK("3"),
BUBBLE("4"),
WAKE("5"),
SPLASH("6"),
SUSPENDED("7"),
DEPTH_SUSPEND("8"),
CRIT("9"),
MAGIC_CRIT("10"),
SMOKE("11"),
LARGE_SMOKE("12"),
SPELL("13"),
INSTANT_SPELL("14"),
MOB_SPELL("15"),
MOB_SPELL_AMBIENT("16"),
WITCH_MAGIC("17"),
DRIP_WATER("18"),
DRIP_LAVA("19"),
ANGRY_VILLAGER("20"),
HAPPY_VILLAGER("21"),
TOWN_AURA("22"),
NOTE("23"),
PORTAL("24"),
ENCHANTMENT_TABLE("25"),
FLAME("26"),
LAVA("27"),
FOOTSTEP("28"),
CLOUD("29"),
RED_DUST("30"),
SNOWBALL_POOF("31"),
SNOW_SHOVEL("32"),
SLIME("33"),
HEART("34"),
BARRIER("35"),
ICONCRACK_("36"),
BLOCKCRACK_("37"),
BLOCKDUST_("38"),
DROPLET("39"),
TAKE("40"),
MOB_APPEARANCE("41");
EXPLOSION(0),
EXPLOSION_LARGE(1),
EXPLOSION_HUGE(2),
FIREWORKS_SPARK(3),
BUBBLE(4),
WAKE(5),
SPLASH(6),
SUSPENDED(7),
DEPTH_SUSPEND(8),
CRIT(9),
MAGIC_CRIT(10),
SMOKE(11),
LARGE_SMOKE(12),
SPELL(13),
INSTANT_SPELL(14),
MOB_SPELL(15),
MOB_SPELL_AMBIENT(16),
WITCH_MAGIC(17),
DRIP_WATER(18),
DRIP_LAVA(19),
ANGRY_VILLAGER(20),
HAPPY_VILLAGER(21),
TOWN_AURA(22),
NOTE(23),
PORTAL(24),
ENCHANTMENT_TABLE(25),
FLAME(26),
LAVA(27),
FOOTSTEP(28),
CLOUD(29),
RED_DUST(30),
SNOWBALL_POOF(31),
SNOW_SHOVEL(32),
SLIME(33),
HEART(34),
BARRIER(35),
ICONCRACK_(36),
BLOCKCRACK_(37),
BLOCKDUST_(38),
DROPLET(39),
TAKE(40),
MOB_APPEARANCE(41);
private final String particleId;
private final int particleId;
Eff_1_8_R1(String particleId) {
Eff_1_8_R1(int particleId) {
this.particleId = particleId;
}

View File

@ -179,6 +179,14 @@ public class NpcEffectThread implements Runnable {
e.printStackTrace();
}
} else {
try {
Eff_1_8_R1.valueOf(Quests.effect);
} catch (Exception e) {
Quests.getInstance().getLogger().info(Quests.effect + " is not a valid effect name!");
e.printStackTrace();
}
}
}