mirror of
https://github.com/PikaMug/Quests.git
synced 2024-09-12 07:28:06 +02:00
Inform console of invalid npc-effect on 1.8 protocol, fixes #765
This commit is contained in:
parent
7cae9d8560
commit
36b4220839
@ -19,7 +19,7 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import me.blackvein.quests.particle.ParticleProvider;
|
||||
|
||||
import me.blackvein.quests.particle.PreBuiltParticle;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
|
||||
public class NpcEffectThread implements Runnable {
|
||||
@ -63,5 +63,4 @@ public class NpcEffectThread implements Runnable {
|
||||
eyeLoc.setY(eyeLoc.getY() + 1.5);
|
||||
ParticleProvider.sendToPlayer(player, eyeLoc, effectType);
|
||||
}
|
||||
|
||||
}
|
@ -18,6 +18,8 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
|
||||
public abstract class ParticleProvider {
|
||||
|
||||
private static ParticleProvider loaded;
|
||||
@ -100,6 +102,8 @@ public abstract class ParticleProvider {
|
||||
} else {
|
||||
try {
|
||||
loaded.spawnParticle(player, location, Particle.valueOf(particleId), 0, 0, 0, 1, 3, null);
|
||||
} catch (NoClassDefFoundError e1) {
|
||||
Bukkit.getLogger().severe("[Quests] This protocol does not support npc-effect: " + particleId);
|
||||
} catch (IllegalArgumentException exception) {
|
||||
// Fail silently
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user