mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Fix #263 - NPE on TPSBar when player disconnects
This commit is contained in:
@@ -84,10 +84,10 @@ index 0000000000000000000000000000000000000000..807f5709af7fd9497633ecfc9e932f0d
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/pl3x/purpur/task/TPSBarTask.java b/src/main/java/net/pl3x/purpur/task/TPSBarTask.java
|
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
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..dcb973f658c2ff30ab014785f530a3db0aebe512
|
index 0000000000000000000000000000000000000000..f9f75d96565ccee9437b7d39a98c9adf97446e51
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/net/pl3x/purpur/task/TPSBarTask.java
|
+++ b/src/main/java/net/pl3x/purpur/task/TPSBarTask.java
|
||||||
@@ -0,0 +1,111 @@
|
@@ -0,0 +1,112 @@
|
||||||
+package net.pl3x.purpur.task;
|
+package net.pl3x.purpur.task;
|
||||||
+
|
+
|
||||||
+import org.bukkit.Bukkit;
|
+import org.bukkit.Bukkit;
|
||||||
@@ -174,7 +174,8 @@ index 0000000000000000000000000000000000000000..dcb973f658c2ff30ab014785f530a3db
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public static void removePlayer(Player player) {
|
+ public static void removePlayer(Player player) {
|
||||||
+ instance.getBossBar().removePlayer(player);
|
+ BossBar bossbar = instance.getBossBar();
|
||||||
|
+ bossbar.removePlayer(player);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public static void togglePlayer(Player player) {
|
+ public static void togglePlayer(Player player) {
|
||||||
|
|||||||
Reference in New Issue
Block a user