本文整理汇总了C#中Terraria.Player.hasPermissions方法的典型用法代码示例。如果您正苦于以下问题:C# Player.hasPermissions方法的具体用法?C# Player.hasPermissions怎么用?C# Player.hasPermissions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Terraria.Player
的用法示例。
在下文中一共展示了Player.hasPermissions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrintCommandUsage
private void PrintCommandUsage(Player player)
{
WisperPlayer(player, String.Format(" Version {0} by {1} - Help:", pluginVersion, pluginAuthor));
//WisperPlayer(player, "* /region help - shows this help"); // Too Obvious?
WisperPlayer(player, "* /region create - creates your protected region");
WisperPlayer(player, "* /region cancel - cancel the region creation/inspection");
WisperPlayer(player, "* /region delete - deletes your protected region");
WisperPlayer(player, "* /region list - list members of your region");
WisperPlayer(player, "* /region invite <name> - invites player to your region");
WisperPlayer(player, "* /region ban <name> - bans player from your region");
if (player.hasPermissions(PERMISSION_ADMIN))
{
// TODO:
//WisperPlayer(player, "* /region inspect - inspect a region for owners (admin)");
//WisperPlayer(player, "* /region screate <region name> - creates a server protected region (admin)");
//WisperPlayer(player, "* /region sdelete <region name> - deletes a server protected region (admin)");
//WisperPlayer(player, "* /region slist <region name> - list members of a server protected region (admin)");
//WisperPlayer(player, "* /region sinvite <region name> <name> - invites players to a server protected region (admin)");
//WisperPlayer(player, "* /region sban <name> - bans player from a server protected region (admin)");
}
}