Skip to content

Commit

Permalink
Update piemc.py
Browse files Browse the repository at this point in the history
Fix issues with setmaxplayers and fakeonline accessing the wrong variables.
  • Loading branch information
SixpennyYard authored May 9, 2024
1 parent fa4452c commit b52118c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions piemc/commands/piemc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ def ping(server):
def stop(server):
server.logger.info("Stopping the server...")
server.stop()

@ConsoleCMD
def setmaxplayers(server, maxplayers):
server.max_players = maxplayers
server.update_server_status()
server.bedrock_server.max_players = maxplayers
server.bedrock_server.update_server_status()

@ConsoleCMD
def fakeonline(server, amount):
server.players_online = amount
server.update_server_status()
server.bedrock_server.players_online = amount
server.bedrock_server.update_server_status()

0 comments on commit b52118c

Please sign in to comment.