From b2cb8eb5dc218f43b267a29c9150f5b9e393ae53 Mon Sep 17 00:00:00 2001 From: Esophose Date: Wed, 28 Nov 2018 23:40:22 -0700 Subject: [PATCH] Bug fix: Spawning fixed effects while owner is offline --- src/com/esophose/playerparticles/PlayerParticles.java | 5 ++++- .../esophose/playerparticles/particles/ParticleEffect.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/esophose/playerparticles/PlayerParticles.java b/src/com/esophose/playerparticles/PlayerParticles.java index 464f0d8..ca12f48 100644 --- a/src/com/esophose/playerparticles/PlayerParticles.java +++ b/src/com/esophose/playerparticles/PlayerParticles.java @@ -2,9 +2,12 @@ * TODO: v6.0 * + Add new style 'tornado' * + Add new style 'doubleorbit' + * + Add new style 'wings_', multiple new wing types * * Adjust style positioning around central point based on if they are being spawned for a player or fixed effect - * * Write a class called ConfigManager which manages updating the config.yml between versions so it doesn't have to be deleted every time * * Display a note in the GUI under event-based styles + * + * TODO: v6.1 + * * Write a class called ConfigManager which manages updating the config.yml between versions so it doesn't have to be deleted every time */ package com.esophose.playerparticles; diff --git a/src/com/esophose/playerparticles/particles/ParticleEffect.java b/src/com/esophose/playerparticles/particles/ParticleEffect.java index 31b99f4..67b3ff3 100644 --- a/src/com/esophose/playerparticles/particles/ParticleEffect.java +++ b/src/com/esophose/playerparticles/particles/ParticleEffect.java @@ -316,7 +316,7 @@ public enum ParticleEffect { for (PPlayer pplayer : ParticleManager.getPPlayers()) { Player p = pplayer.getPlayer(); - if (pplayer.canSeeParticles() && p.getWorld().equals(center.getWorld()) && center.distanceSquared(p.getLocation()) <= range * range) { + if (p != null && pplayer.canSeeParticles() && p.getWorld().equals(center.getWorld()) && center.distanceSquared(p.getLocation()) <= range * range) { players.add(p); } }