1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 05:55:27 +01:00

Check for null player

This commit is contained in:
Zrips 2016-08-11 17:06:25 +03:00
parent 7c8bfda568
commit 558f775b2b
2 changed files with 6 additions and 4 deletions

View File

@ -128,7 +128,7 @@ public class JobsPlayer {
* @return the Multiplier
*/
public double getVipSpawnerMultiplier() {
if (!this.OffPlayer.isOnline())
if (OffPlayer == null || !this.OffPlayer.isOnline())
return 1.0;
if (VipSpawnerMultiplier < 0)
updateVipSpawnerMultiplier();
@ -152,11 +152,14 @@ public class JobsPlayer {
public double getBoost(String JobName, BoostType type, boolean force) {
double Boost = 1.0;
if (this.OffPlayer == null)
return Boost;
if (this.player == null)
this.player = Bukkit.getPlayer(this.OffPlayer.getUniqueId());
double Boost = 1.0;
if (this.player == null)
return Boost;

View File

@ -23,7 +23,6 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;