AternosServer - DarkCat09/python-aternos GitHub Wiki

Methods

__init__

python_aternos.AternosServer.__init__(self, servid, atconn)

  • servid - Aternos server identifier, parsed from div[@class="server-body"]/@data-id.
  • atconn - AternosConnect object.

start

python_aternos.AternosServer.start(self, accepteula=True)
Starts Aternos server.

  • accepteula (optional) - automatically accepts the EULA if needed.

Raises AternosServerStartError, when it is unable to start server for one of the reasons below:

  • EULA was not accepted and accepteula=False,
  • The server is already running,
  • Other reason (its code is in the error message).

Example:

servers[0].start()

stop

python_aternos.AternosServer.stop(self)
Stops the server.

Example:

servers[0].stop()

cancel

python_aternos.AternosServer.cancel(self)
Cancels the server starting.

Example:

servers[0].cancel()

restart

python_aternos.AternosServer.restart(self)
Restarts the server.

Example:

servers[0].restart()

eula

python_aternos.AternosServer.eula(self)
Use this function to accept the EULA, if it wasn't accepted
(for example, after starting server from aternos.org or using start)

Example:

servers[0].eula()

Properties

address

python_aternos.AternosServer.address
Get the server address.

software

python_aternos.AternosServer.software
Get the server software (for example, Vanilla or Forge).

version

python_aternos.AternosServer.version
Get the server software version (for example, 1.12.2 or 1.12.2 (14.23.4.2766))