-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
31 lines (27 loc) · 913 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using Terraria;
using TerrariaApi.Server;
using TShockAPI;
using Microsoft.Xna.Framework;
namespace PluginTemplate
{
public class PluginTemplate : TerrariaPlugin
{
public override string Name => "PluginTemplate";
public override string Author => "Your name here";
public override string Description => "Change me!";
public override Version Version => new Version(1,0,0);
public PluginTemplate(Main game) : base(game)
{
}
// Your initalization code(such as reading config files, registering hooks etc) should go here.
public override void Initialize()
{
ServerApi.Hooks.NetGreetPlayer.Register(this, GreetPlayer);
}
private void GreetPlayer(GreetPlayerEventArgs e)
{
TSPlayer.All.SendMessage($"Hello {e.Who}", Color.DarkBlue);
}
}
}