From fd64422318de704860bb0b789f21153f7ee0d32a Mon Sep 17 00:00:00 2001
From: Unprotesting <64268594+Unprotesting@users.noreply.github.com>
Date: Tue, 25 Aug 2020 10:20:59 +0100
Subject: [PATCH] 0.8.4 - Fixed an error message displaying when no players are
online
+ Fixed an error message displaying in console when no players are online and autosell is turned on
+ Updated to 0.8.4
---
Auto-Tune/dependency-reduced-pom.xml | 4 ++--
Auto-Tune/pom.xml | 2 +-
.../github/util/AutoTunePlayerAutoSellEventHandler.java | 9 +++++++--
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/Auto-Tune/dependency-reduced-pom.xml b/Auto-Tune/dependency-reduced-pom.xml
index 1498109..f94f277 100644
--- a/Auto-Tune/dependency-reduced-pom.xml
+++ b/Auto-Tune/dependency-reduced-pom.xml
@@ -4,7 +4,7 @@
unprotesting.com.github
Auto-Tune
Auto-Tune
- 0.8.3
+ 0.8.4
The automatic pricing plugin for minecraft
https://github.com/Unprotesting/Auto-Tune
@@ -129,9 +129,9 @@
- 1.8
${project.groupId}.${project.artifactId}
UTF-8
+ 1.8
diff --git a/Auto-Tune/pom.xml b/Auto-Tune/pom.xml
index e148f8a..c1f5b2b 100644
--- a/Auto-Tune/pom.xml
+++ b/Auto-Tune/pom.xml
@@ -8,7 +8,7 @@
unprotesting.com.github
Auto-Tune
- 0.8.3
+ 0.8.4
jar
Auto-Tune
diff --git a/Auto-Tune/src/unprotesting/com/github/util/AutoTunePlayerAutoSellEventHandler.java b/Auto-Tune/src/unprotesting/com/github/util/AutoTunePlayerAutoSellEventHandler.java
index 8042280..756247d 100644
--- a/Auto-Tune/src/unprotesting/com/github/util/AutoTunePlayerAutoSellEventHandler.java
+++ b/Auto-Tune/src/unprotesting/com/github/util/AutoTunePlayerAutoSellEventHandler.java
@@ -23,8 +23,13 @@ public void run() {
catch (IllegalArgumentException e){
continue;
}
- AutoTuneSellCommand.roundAndGiveMoney(p, Main.tempdatadata.get(uuid), false);
- Main.tempdatadata.remove(uuid);
+ if (p != null){
+ if (p.isOnline() && (p.hasPermission("at.autosell") || p.isOp())){
+ AutoTuneSellCommand.roundAndGiveMoney(p, Main.tempdatadata.get(uuid), false);
+ Main.tempdatadata.remove(uuid);
+ }
+
+ }
}
}
}
\ No newline at end of file