mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-30 06:33:33 +01:00
Fix rare exception when attempting to show effect over killed NPC
This commit is contained in:
parent
065c3f0b8e
commit
e03a7ea171
@ -61,6 +61,9 @@ public class NpcEffectThread implements Runnable {
|
|||||||
* @param effectType Value of EnumParticle such as NOTE or SMOKE
|
* @param effectType Value of EnumParticle such as NOTE or SMOKE
|
||||||
*/
|
*/
|
||||||
public void showEffect(Player player, NPC npc, String effectType) {
|
public void showEffect(Player player, NPC npc, String effectType) {
|
||||||
|
if (player == null || npc == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (plugin.getDependencies().getCitizens() != null) {
|
if (plugin.getDependencies().getCitizens() != null) {
|
||||||
Location eyeLoc = npc.getEntity().getLocation();
|
Location eyeLoc = npc.getEntity().getLocation();
|
||||||
eyeLoc.setY(eyeLoc.getY() + 1.5);
|
eyeLoc.setY(eyeLoc.getY() + 1.5);
|
||||||
|
Loading…
Reference in New Issue
Block a user