giantsd/plugins/greetings.py

14 lines
406 B
Python

class Greetings:
def __init__(self, server):
self.server = server
async def on_player_join(self, player):
await self.server.broadcast_message("Welcome "+player.name+"!")
async def on_map_change(self, newmap):
await self.server.broadcast_message("You are now playing on "+newmap.mapname)
def setup(server):
plugin = Greetings(server)
server.add_plugin(plugin)