当前位置: 首页>>代码示例>>Java>>正文


Java PlayerChatHelper.SendWarn方法代码示例

本文整理汇总了Java中eu.usrv.yamcore.auxiliary.PlayerChatHelper.SendWarn方法的典型用法代码示例。如果您正苦于以下问题:Java PlayerChatHelper.SendWarn方法的具体用法?Java PlayerChatHelper.SendWarn怎么用?Java PlayerChatHelper.SendWarn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eu.usrv.yamcore.auxiliary.PlayerChatHelper的用法示例。


在下文中一共展示了PlayerChatHelper.SendWarn方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processCommand

import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
@Override
public void processCommand(ICommandSender pCmdSender, String[] pArgs)
{
    if (pArgs.length == 0)
    {
        if (InGame(pCmdSender)) {
            PlayerChatHelper.SendError(pCmdSender, "Syntax error. Type /customfuels help for help");
        } else {
            PlayerChatHelper.SendPlain(pCmdSender, "[CFLS] Syntax error. Type /customfuels help for help");
        }
        return;
    }
    else if ("help".equalsIgnoreCase(pArgs[0]))
    {
        SendHelpToPlayer(pCmdSender);
    }
    else if ("reload".equalsIgnoreCase(pArgs[0]))
    {
        boolean tFlag = MainRegistry.Module_CustomFuels.ReloadCustomFuels();
        if (!tFlag)
        {
            if (!InGame(pCmdSender)) {
                PlayerChatHelper.SendPlain(pCmdSender, "[CFLS] Reload failed. Check your log for syntax errors");
            } else {
                PlayerChatHelper.SendWarn(pCmdSender, "Reload failed. Check your log for syntax errors");
            }
        }
        else
        {
            if (!InGame(pCmdSender)) {
                PlayerChatHelper.SendPlain(pCmdSender, "[CFLS] Reload done. New config is activated");
            } else {
                PlayerChatHelper.SendInfo(pCmdSender, "Reload done. New config is activated");
            }
        }
    }
    else {
        SendHelpToPlayer(pCmdSender);
    }
}
 
开发者ID:GTNewHorizons,项目名称:NewHorizonsCoreMod,代码行数:41,代码来源:CustomFuelsCommand.java

示例2: processCommand

import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
@Override
public void processCommand(ICommandSender pCmdSender, String[] pArgs)
{
    if (pArgs.length == 0)
    {
        if (InGame(pCmdSender)) {
            PlayerChatHelper.SendError(pCmdSender, "Syntax error. Type /customtooltips help for help");
        } else {
            PlayerChatHelper.SendPlain(pCmdSender, "[CTT] Syntax error. Type /customtooltips help for help");
        }
        return;
    }
    else if ("help".equalsIgnoreCase(pArgs[0]))
    {
        SendHelpToPlayer(pCmdSender);
    }
    else if ("reload".equalsIgnoreCase(pArgs[0]))
    {
        boolean tFlag = MainRegistry.Module_CustomToolTips.reload();
        if (!tFlag)
        {
            if (!InGame(pCmdSender)) {
                PlayerChatHelper.SendPlain(pCmdSender, "[CTT] Reload failed. Check your log for syntax errors");
            } else {
                PlayerChatHelper.SendWarn(pCmdSender, "Reload failed. Check your log for syntax errors");
            }
        }
        else
        {
            if (!InGame(pCmdSender)) {
                PlayerChatHelper.SendPlain(pCmdSender, "[CTT] Reload done. New config is activated");
            } else {
                PlayerChatHelper.SendInfo(pCmdSender, "Reload done. New config is activated");
            }
        }
    }
    else {
        SendHelpToPlayer(pCmdSender);
    }
}
 
开发者ID:GTNewHorizons,项目名称:NewHorizonsCoreMod,代码行数:41,代码来源:CustomToolTipsCommand.java

示例3: processCommand

import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
@Override
public void processCommand( ICommandSender pCmdSender, String[] pArgs )
{
  if( pArgs.length == 0 )
  {
    if( InGame( pCmdSender ) ) {
        PlayerChatHelper.SendError(pCmdSender, "Syntax error. Type /customdrops help for help");
    } else {
        PlayerChatHelper.SendPlain(pCmdSender, "[CDRP] Syntax error. Type /customdrops help for help");
    }
    return;
  }
  else if("help".equalsIgnoreCase(pArgs[0]))
  {
    SendHelpToPlayer( pCmdSender );
  }
  else if("toggleinfo".equalsIgnoreCase(pArgs[0]))
  {
    if( !InGame( pCmdSender ) ) {
        PlayerChatHelper.SendPlain(pCmdSender, "[CDRP] This command can only be executed ingame");
    } else
    {
      EntityPlayer tEP = (EntityPlayer) pCmdSender;
      MainRegistry.Module_CustomDrops.toggleDeathInfoForPlayer( tEP );
    }
  }
  else if("reload".equalsIgnoreCase(pArgs[0]))
  {
    boolean tFlag = MainRegistry.Module_CustomDrops.ReloadCustomDrops();
    if( !tFlag )
    {
      if( !InGame( pCmdSender ) ) {
          PlayerChatHelper.SendPlain(pCmdSender, "[CDRP] Reload failed. Check your log for syntax errors");
      } else {
          PlayerChatHelper.SendWarn(pCmdSender, "Reload failed. Check your log for syntax errors");
      }
    }
    else
    {
      if( !InGame( pCmdSender ) ) {
          PlayerChatHelper.SendPlain(pCmdSender, "[CDRP] Reload done. New config is activated");
      } else {
          PlayerChatHelper.SendInfo(pCmdSender, "Reload done. New config is activated");
      }
    }
  }
  else {
      SendHelpToPlayer(pCmdSender);
  }
}
 
开发者ID:GTNewHorizons,项目名称:NewHorizonsCoreMod,代码行数:51,代码来源:CustomDropsCommand.java


注:本文中的eu.usrv.yamcore.auxiliary.PlayerChatHelper.SendWarn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。