diff --git a/pom.xml b/pom.xml
index b34450f0..ae5e52bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
veth.vetheon
SurvivalPlus
- 4.0.2-RELEASE
+ 4.0.4-RELEASE
1.8
diff --git a/src/main/java/veth/vetheon/survival/managers/Placeholders.java b/src/main/java/veth/vetheon/survival/managers/Placeholders.java
index 53e2c488..53cf32c1 100644
--- a/src/main/java/veth/vetheon/survival/managers/Placeholders.java
+++ b/src/main/java/veth/vetheon/survival/managers/Placeholders.java
@@ -45,6 +45,11 @@ public String getVersion() {
@Override
public String onPlaceholderRequest(Player p, String identifier) {
PlayerData playerData = playerManager.getPlayerData(p);
+
+ if (playerData == null )
+ {
+ return null;
+ }
// Shows player's health, kinda useless but here it is
if (identifier.equalsIgnoreCase("player_health")) {
diff --git a/src/main/java/veth/vetheon/survival/managers/PlayerManager.java b/src/main/java/veth/vetheon/survival/managers/PlayerManager.java
index bd7d62cf..0d80a1a6 100644
--- a/src/main/java/veth/vetheon/survival/managers/PlayerManager.java
+++ b/src/main/java/veth/vetheon/survival/managers/PlayerManager.java
@@ -210,6 +210,10 @@ public Location lookAt(Location loc, Location lookat) {
}
public List ShowThirst(Player player) {
+ if (player == null)
+ {
+ return null;
+ }
StringBuilder thirstBar = new StringBuilder();
PlayerData data = getPlayerData(player);
int thirst = data.getThirst();
@@ -233,6 +237,10 @@ else if (thirst <= 6)
}
public List ShowHunger(Player player) {
+ if (player == null)
+ {
+ return null;
+ }
int hunger = player.getFoodLevel();
int saturation = Math.round(player.getSaturation());
StringBuilder hungerBar = new StringBuilder();
@@ -258,6 +266,10 @@ else if (hunger <= 6)
}
public List ShowNutrients(Player player) {
+ if (player == null)
+ {
+ return null;
+ }
List nutrients = new ArrayList<>();
PlayerData data = getPlayerData(player);
@@ -290,6 +302,10 @@ public List ShowNutrients(Player player) {
}
public List showEnergy(Player player) {
+ if (player == null)
+ {
+ return null;
+ }
PlayerData playerData = getPlayerData(player);
double energy = Math.floor(playerData.getEnergy());
StringBuilder energyBar = new StringBuilder();
diff --git a/target/SurvivalPlus-4.0.2-RELEASE.jar b/target/SurvivalPlus-4.0.4-RELEASE.jar
similarity index 84%
rename from target/SurvivalPlus-4.0.2-RELEASE.jar
rename to target/SurvivalPlus-4.0.4-RELEASE.jar
index 37f14df3..ad646197 100644
Binary files a/target/SurvivalPlus-4.0.2-RELEASE.jar and b/target/SurvivalPlus-4.0.4-RELEASE.jar differ
diff --git a/target/classes/plugin.yml b/target/classes/plugin.yml
index ad0d7d06..4fa17bc0 100644
--- a/target/classes/plugin.yml
+++ b/target/classes/plugin.yml
@@ -1,7 +1,7 @@
name: SurvivalPlus
main: veth.vetheon.survival.Survival
authors: [FattyMieo, ShaneBee, VetheonGames]
-version: '4.0.2-RELEASE'
+version: '4.0.4-RELEASE'
api-version: '1.17'
softdepend:
- PlaceholderAPI
diff --git a/target/classes/veth/vetheon/survival/managers/Placeholders.class b/target/classes/veth/vetheon/survival/managers/Placeholders.class
index 95d76e31..6d848876 100644
Binary files a/target/classes/veth/vetheon/survival/managers/Placeholders.class and b/target/classes/veth/vetheon/survival/managers/Placeholders.class differ
diff --git a/target/classes/veth/vetheon/survival/managers/PlayerManager.class b/target/classes/veth/vetheon/survival/managers/PlayerManager.class
index 51f3976d..8909a9f5 100644
Binary files a/target/classes/veth/vetheon/survival/managers/PlayerManager.class and b/target/classes/veth/vetheon/survival/managers/PlayerManager.class differ
diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties
index 7b4dce15..cadb4af6 100644
--- a/target/maven-archiver/pom.properties
+++ b/target/maven-archiver/pom.properties
@@ -1,5 +1,5 @@
#Generated by Maven
-#Mon Sep 20 22:32:20 MDT 2021
+#Tue Sep 21 14:39:49 MDT 2021
groupId=veth.vetheon
artifactId=SurvivalPlus
-version=4.0.2-RELEASE
+version=4.0.4-RELEASE