mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Check for null player
This commit is contained in:
parent
7c8bfda568
commit
558f775b2b
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user