Skip to content

Commit 9c7c968

Browse files
committed
Do not show offline markers for BM hidden players
Closes #24
1 parent 004994d commit 9c7c968

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ Compatible with Paper 1.13+, just like BlueMap itself.
1313

1414
To reload this plugin, just reload BlueMap itself with `/bluemap reload`.
1515

16+
If you want specific players to not get offline markers, you can hide them from BlueMap
17+
by using a plugin like [BlueMapPlayerControl](https://github.com/TechnicJelle/BlueMapPlayerControl) (also by me).
18+
1619
## [Click here to download!](../../releases/latest)
1720

1821
## [TODO list](../../projects/1?fullscreen=true)
1922

2023
## Support
2124

22-
To get support with this plugin, join the [BlueMap Discord server](https://bluecolo.red/map-discord) and ask your questions in [#3rd-party-support](https://discord.com/channels/665868367416131594/863844716047106068). You're welcome to ping me, @TechnicJelle.
25+
To get support with this plugin, join the [BlueMap Discord server](https://bluecolo.red/map-discord)
26+
and ask your questions in [#3rd-party-support](https://discord.com/channels/665868367416131594/863844716047106068). You're welcome to ping me, @TechnicJelle.
2327

2428
## Special thanks to
2529

src/main/java/com/technicjelle/bluemapofflineplayermarkers/MarkerHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
import java.io.File;
1919
import java.io.FileInputStream;
2020
import java.io.IOException;
21-
import java.text.SimpleDateFormat;
22-
import java.util.Date;
2321
import java.util.List;
2422
import java.util.Optional;
2523
import java.util.UUID;
@@ -55,6 +53,9 @@ public static void add(OfflinePlayer player, Location location) {
5553
}
5654
BlueMapAPI api = optionalApi.get();
5755

56+
//If this player's visibility is disabled on the map, don't add the marker.
57+
if (!api.getWebApp().getPlayerVisibility(player.getUniqueId())) return;
58+
5859
// Get BlueMapWorld for the location
5960
BlueMapWorld blueMapWorld = api.getWorld(location.getWorld()).orElse(null);
6061
if (blueMapWorld == null) return;

0 commit comments

Comments
 (0)