
code
By: a guest on
Aug 18th, 2012 | syntax:
None | size: 1.93 KB | hits: 15 | expires: Never
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Terraria;
using Hooks;
using TShockAPI;
using TShockAPI.DB;
using System.ComponentModel;
using System.Net;
using Newtonsoft.Json;
namespace EventServer
{
[APIVersion(1, 12)]
public class EventServer : TerrariaPlugin
{
public EventServer(Main game)
: base(game)
{
Order = 10;
}
#region Main Plugin
public static List<Player> spelers = new List<Player>();
public static int update = 0;
public override string Name
{
get { return "Event"; }
}
public override string Author
{
get { return "Anonymous"; }
}
public override string Description
{
get { return "Private plugin for the server events"; }
}
public override Version Version
{
get { return new Version(1, 1, 1); }
}
public override void Initialize()
{
Console.WriteLine("bla");
GameHooks.Initialize += OnInitialize;
ServerHooks.Leave += OnLeave;
//GameHooks.Update += OnUpdate;
}
public static void PlayerPhysics(Player player)
{
player.position.X = 120;
Console.WriteLine("fe");
}
public static void OnInitialize()
{
Console.WriteLine("ja");
Commands.ChatCommands.Add(new Command("", Test, "test"));
}
public static void OnLeave(int id)
{
Console.WriteLine("fesf");
}
public static void OnUpdate()
{
}
public static void Test(CommandArgs args)
{
Console.WriteLine("command uitgevoerd");
args.Player.SendMessage("test.");
}
#endregion
}
}