Added some docs on the player class. Also changed Command Callback to use object's instead of CommandArgs to promote generics. The new /test command will simply send the player a success message so that it can be tested on the console without opening the game( I dont have the game at work and didnt want to worldgen so I have no clue if it works as intended[ will be able to fix etc later tonight as I dont expect many people to be working on this before then] )

This commit is contained in:
Zack Piispanen 2012-06-01 11:54:05 -04:00
parent 51e1991643
commit 50ecce618e
2 changed files with 181 additions and 11 deletions

View file

@ -322,9 +322,9 @@ namespace TShockAPI
private static void TestCallbackCommand(CommandArgs args)
{
Action<CommandArgs> a = (s) => args.Player.Spawn();
Action<object> a = (s) => { ((CommandArgs)s).Player.SendSuccessMessage("This is your callack"); };
args.Player.AddResponse( "yes", a);
args.Player.SendInfoMessage( "Type yes to spawn." );
args.Player.SendInfoMessage( "Type /yes to get called back." );
}
#region Account commands