Update Utilities-OG API, only show balance in main worlds
This commit is contained in:
1 parent
d9c0304812
commit
c22f8d4ac5
2 files changed
+9
-1
No files matched your search
+1
-1
Submodule libs/Utilities-OG updated: 3e26fb1a84...9273a4011e.
@@ -68,6 +68,14 @@ public class DiamondBankMiniPlaceholdersOG extends JavaPlugin {
|
||||
// DiamondBank transaction lock or a database round-trip.
|
||||
UtilitiesOG.registerAudiencePlaceholder("diamondbankog_balance", player -> {
|
||||
|
||||
// Only show balance in vanilla overworld, nether, and end.
|
||||
final String worldName = player.getWorld().getName();
|
||||
if (!worldName.equals("world") && !worldName.equals("world_nether") && !worldName.equals("world_the_end")) {
|
||||
|
||||
return "&8N/A";
|
||||
|
||||
}
|
||||
|
||||
final Long cachedShards = SHARD_CACHE.get(player.getUniqueId());
|
||||
if (cachedShards != null) {
|
||||
|
||||
|
||||
Reference in new issue
Block a user