Skip to content

Commit

Permalink
Fix tpsbar visible exclude issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHua269 committed Sep 9, 2023
1 parent 30f381f commit 2b90edc
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions patches/server/0050-Fix-tpsbar-visible-exclude-issue.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: wangxyper <[email protected]>
Date: Sat, 9 Sep 2023 21:58:26 +0800
Subject: [PATCH] Fix tpsbar visible exclude issue


diff --git a/src/main/java/me/earthme/molia/functions/GlobalServerTpsBar.java b/src/main/java/me/earthme/molia/functions/GlobalServerTpsBar.java
index 71a264fa7c16946ffb8dbac0273c4a05c8827700..5c852426ef251a77396a9921ac2c2e2b3ff91ea0 100644
--- a/src/main/java/me/earthme/molia/functions/GlobalServerTpsBar.java
+++ b/src/main/java/me/earthme/molia/functions/GlobalServerTpsBar.java
@@ -105,7 +105,12 @@ public class GlobalServerTpsBar {

private static void updateBarVisibilityForPlayers(){
for (Player player : Bukkit.getOnlinePlayers()){
- if (player instanceof Bot || visibleExclude.contains(player)){
+ if (player instanceof Bot){
+ continue;
+ }
+
+ if (visibleExclude.contains(player)){
+ addedPlayers.remove(player);
continue;
}

0 comments on commit 2b90edc

Please sign in to comment.