Skip to content

Commit

Permalink
Create tps.py
Browse files Browse the repository at this point in the history
  • Loading branch information
a3510377 committed Nov 3, 2023
1 parent b7ff9c3 commit aa98bbb
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions plugins/tps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from __future__ import annotations

import re

from server import BaseServer, Plugin
from server.utils import Config

minecraft_list_match = re.compile(
r"There are \d+ of a max(?: of)? \d+ players online:(.*)"
)
minecraft_GList_match = re.compile(r"\[(.*)\] \(\d*\):((?:.*[ ,]?)+)")


class OnlineConfig(Config):
online_enabled = True
query_online_names = ["Survival"]
bungeecord_list = {
"BungeecordA": {
"address": "127.0.0.1",
"port": 39999,
"password": "Bungee Rcon Password",
}
}


class Tps(Plugin, config=OnlineConfig):
def __init__(self, server: BaseServer) -> None:
super().__init__(server)


def setup(server: BaseServer):
server.add_plugin(Tps(server))

0 comments on commit aa98bbb

Please sign in to comment.