本文整理汇总了Java中eu.usrv.yamcore.auxiliary.PlayerChatHelper.SendError方法的典型用法代码示例。如果您正苦于以下问题:Java PlayerChatHelper.SendError方法的具体用法?Java PlayerChatHelper.SendError怎么用?Java PlayerChatHelper.SendError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eu.usrv.yamcore.auxiliary.PlayerChatHelper
的用法示例。
在下文中一共展示了PlayerChatHelper.SendError方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onScrewdriverRightClick
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
@Override
public void onScrewdriverRightClick( byte pSide, EntityPlayer pPlayer, float pX, float pY, float pZ )
{
if (pPlayer.isSneaking())
{
if (mMode == 0)
{
incRadiusTierOverride();
markDirty();
PlayerChatHelper.SendInfo( pPlayer, String.format( "Machine radius changed to %d Blocks", getRadiusTierOverride() ));
}
else
PlayerChatHelper.SendError( pPlayer, String.format( "Can't change radius; Machine is in TileEntity Mode!" ));
}
else
{
mMode = (byte) ( mMode == 0x00 ? 0x01 : 0x00 );
markDirty();
PlayerChatHelper.SendInfo( pPlayer, String.format( "Switched mode to: %s", mModeStr[mMode] ) );
}
}
示例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 /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);
}
}
示例3: processCommand
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
@Override
public void processCommand(ICommandSender pCmdSender, String[] pArgs)
{
try
{
if (!InGame(pCmdSender))
{
PlayerChatHelper.SendPlain(pCmdSender, "You have to execute this command ingame");
return;
}
EntityPlayer tEp = (EntityPlayer) pCmdSender;
ItemStack inHand = null;
if (tEp != null)
{
inHand = tEp.getCurrentEquippedItem();
if (inHand == null)
{
PlayerChatHelper.SendPlain(pCmdSender, "Pickup an item first");
return;
}
}
GameRegistry.UniqueIdentifier UID = GameRegistry.findUniqueIdentifierFor(inHand.getItem());
PlayerChatHelper.SendPlain(pCmdSender, "== Item info");
PlayerChatHelper.SendPlain(pCmdSender, String.format("Unloc.Name: [%s]", inHand.getUnlocalizedName()));
PlayerChatHelper.SendPlain(pCmdSender, String.format("ItemName: [%s]", UID.toString()));
PlayerChatHelper.SendPlain(pCmdSender, String.format("ItemMeta: [%s]", inHand.getItemDamage()));
PlayerChatHelper.SendPlain(pCmdSender, String.format("FluidContainer: [%s]", getFluidContainerContents(inHand)));
PlayerChatHelper.SendPlain(pCmdSender, String.format("ClassName: [%s]", inHand.getItem().getClass().toString()));
PlayerChatHelper.SendPlain(pCmdSender, String.format("ItemNBT: [%s]", inHand.stackTagCompound));
} catch (Exception e)
{
e.printStackTrace();
PlayerChatHelper.SendError(pCmdSender, "Unknown error occoured");
}
}
示例4: 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);
}
}
示例5: moarArgs
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
private void moarArgs( ICommandSender pCmdSender )
{
PlayerChatHelper.SendError( pCmdSender, "Y U NO GIEV MOAR ARGS?" );
}
示例6: 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);
}
}