Bug fix: Spawning fixed effects while owner is offline

This commit is contained in:
Esophose 2018-11-28 23:40:22 -07:00
parent 9cd63bb878
commit b2cb8eb5dc
2 changed files with 5 additions and 2 deletions

View file

@ -2,9 +2,12 @@
* TODO: v6.0
* + Add new style 'tornado'
* + Add new style 'doubleorbit'
* + Add new style 'wings_<type>', 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;

View file

@ -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);
}
}