本文整理汇总了C#中fCraft.Player.GetIgnoreList方法的典型用法代码示例。如果您正苦于以下问题:C# Player.GetIgnoreList方法的具体用法?C# Player.GetIgnoreList怎么用?C# Player.GetIgnoreList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fCraft.Player
的用法示例。
在下文中一共展示了Player.GetIgnoreList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Unignore
internal static void Unignore( Player player, Command cmd ) {
string name = cmd.Next();
if( name != null ) {
PlayerInfo targetInfo;
if( !PlayerDB.FindPlayerInfo( name, out targetInfo ) ) {
PlayerInfo[] infos = PlayerDB.FindPlayers( name );
if( infos.Length == 1 ) {
targetInfo = infos[0];
} else if( infos.Length > 1 ) {
player.ManyMatchesMessage( "player", infos );
return;
} else {
player.NoPlayerMessage( name );
return;
}
} else if( targetInfo == null ) {
player.NoPlayerMessage( name );
return;
}
if( player.Unignore( targetInfo ) ) {
player.MessageNow( "You are no longer ignoring {0}", targetInfo.GetClassyName() );
} else {
player.MessageNow( "You are not currently ignoring {0}", targetInfo.GetClassyName() );
}
} else {
PlayerInfo[] ignoreList = player.GetIgnoreList();
if( ignoreList.Length > 0 ) {
player.MessageNow( "Ignored players: {0}", ignoreList.JoinToClassyString() );
} else {
player.MessageNow( "You are not currently ignoring anyone." );
}
return;
}
}