diff --git a/plugins/utilities/players_list.py b/plugins/utilities/players_list.py index 3b3f1ab..b97906b 100644 --- a/plugins/utilities/players_list.py +++ b/plugins/utilities/players_list.py @@ -1,11 +1,13 @@ -#======================== works only if you are host or plugin works on the server created On '2026/02/06' -#======================== +# ======================== works only if you are host or plugin works on the server created On '2026/02/06' +# ======================== # ba_meta require api 9 import bascenev1 as bs import babase # ba_meta export babase.Plugin + + class ByDrap(bs.Plugin): def __init__(self): self.container = None @@ -22,7 +24,7 @@ class ByDrap(bs.Plugin): def _update_list(self): activity = bs.get_foreground_host_activity() - + if activity is None: if self.container: self.container.delete() @@ -33,7 +35,7 @@ class ByDrap(bs.Plugin): for p in activity.players: name = p.getname(full=True) player_names.append(f" • {name}") - + header = "┏━━━━ Players  ━━━━┓\n\n" footer = "\n\n┗━━━━━━━━━━━━━━━┛" players_str = "\n".join(player_names) if player_names else " Wait for players..." @@ -42,18 +44,18 @@ class ByDrap(bs.Plugin): with activity.context: if self.container is None or not self.container.exists(): self.container = bs.newnode('text', - attrs={ - 'text': final_text, - 'scale': 0.7, - 'color': (0.5, 1.0, 0.5), - 'h_attach': 'right', - 'v_attach': 'top', - 'h_align': 'left', - 'v_align': 'top', - 'position': (-220, -100), - 'flatness': 0.0, - 'shadow': 1.0, - 'res_scale': 1.5 - }) + attrs={ + 'text': final_text, + 'scale': 0.7, + 'color': (0.5, 1.0, 0.5), + 'h_attach': 'right', + 'v_attach': 'top', + 'h_align': 'left', + 'v_align': 'top', + 'position': (-220, -100), + 'flatness': 0.0, + 'shadow': 1.0, + 'res_scale': 1.5 + }) else: self.container.text = final_text