本文整理匯總了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)");
}
}