當前位置: 首頁>>代碼示例>>C#>>正文


C# Player.hasPermissions方法代碼示例

本文整理匯總了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)");
     }
 }
開發者ID:bbf,項目名稱:TOSP,代碼行數:21,代碼來源:RegionProtect.cs


注:本文中的Terraria.Player.hasPermissions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。