本文整理汇总了C#中MCForge.Player.getLoc方法的典型用法代码示例。如果您正苦于以下问题:C# Player.getLoc方法的具体用法?C# Player.getLoc怎么用?C# Player.getLoc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCForge.Player
的用法示例。
在下文中一共展示了Player.getLoc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Use
public override void Use(Player p, string message)
{
if (p == null) { Player.SendMessage(p, "This command can only be used in-game!"); return; }
if (!Directory.Exists("extra/copy"))
Directory.CreateDirectory("extra/copy");
if (!File.Exists("extra/copy/pumpkin.copy"))
{
Player.SendMessage(p, "Pumpkin copy doesn't exist. Downloading...");
try
{
using (WebClient WEB = new WebClient())
WEB.DownloadFile("http://www.mcforge.net/uploads/copy/pumpkin.copy", "extra/copy/pumpkin.copy");
}
catch
{
Player.SendMessage(p, "Sorry, downloading failed. Please try again later.");
return;
}
}
Command.all.Find("retrieve").Use(p, "pumpkin");
Command.all.Find("paste").Use(p, "");
ushort[] loc = p.getLoc(false);
ushort loc0 = (ushort)(loc[0] + 3);
ushort loc2 = (ushort)(loc[2] - 8);
Command.all.Find("click").Use(p, loc0 + " " + loc[1] + " " + loc2);
}