2019-01-23 10:28:23 +01:00
|
|
|
class Greetings:
|
|
|
|
def __init__(self, server):
|
|
|
|
self.server = server
|
|
|
|
|
2019-02-06 01:07:00 +01:00
|
|
|
async def on_player_join(self, player):
|
|
|
|
await self.server.broadcast_message("Welcome "+player.name+"!")
|
2019-01-23 10:28:23 +01:00
|
|
|
|
2019-02-06 01:07:00 +01:00
|
|
|
async def on_map_change(self, newmap):
|
|
|
|
await self.server.broadcast_message("You are now playing on "+newmap.mapname)
|
2019-01-23 10:28:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
def setup(server):
|
|
|
|
plugin = Greetings(server)
|
|
|
|
server.add_plugin(plugin)
|