giants-stupid-server/plugins/greetings.py

14 lines
382 B
Python
Raw Normal View History

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