Fix CME on /stop while using tpsbar

This commit is contained in:
William Blake Galbreath
2021-07-16 13:06:51 -05:00
parent 222262b8b3
commit 50a55b5ca1

View File

@@ -171,7 +171,7 @@ index 0000000000000000000000000000000000000000..5ed9d779fbdd9da1010f5f31ceec6b46
+}
diff --git a/src/main/java/net/pl3x/purpur/task/TPSBarTask.java b/src/main/java/net/pl3x/purpur/task/TPSBarTask.java
new file mode 100644
index 0000000000000000000000000000000000000000..8d3823e0be0cab31a906ec30f0a16fe11de86f25
index 0000000000000000000000000000000000000000..5d309648df8057ceee72a66856f74eeac4c632cc
--- /dev/null
+++ b/src/main/java/net/pl3x/purpur/task/TPSBarTask.java
@@ -0,0 +1,201 @@
@@ -327,7 +327,7 @@ index 0000000000000000000000000000000000000000..8d3823e0be0cab31a906ec30f0a16fe1
+ @Override
+ public void cancel() {
+ super.cancel();
+ this.bossbars.keySet().forEach(uuid -> {
+ new HashSet<>(this.bossbars.keySet()).forEach(uuid -> {
+ Player player = Bukkit.getPlayer(uuid);
+ if (player != null) {
+ removePlayer(player);