Properly cancel cast particles if player is offline or dead.

(Prevents another 'Player must be online' error from happening)
This commit is contained in:
ASangarin 2020-08-12 02:02:50 +02:00
parent 5e0999e173
commit ec13e4bf16

View File

@ -134,8 +134,9 @@ public class SpellCast implements Listener {
@Override
public void run() {
if (!playerData.isOnline() || playerData.getPlayer().isDead())
close();
if (!playerData.isOnline() || playerData.getPlayer().isDead()) {
close(); return;
}
if (j % 20 == 0)
playerData.displayActionBar(getFormat(playerData));