本文整理汇总了Java中eu.usrv.yamcore.auxiliary.PlayerChatHelper.SendInfo方法的典型用法代码示例。如果您正苦于以下问题:Java PlayerChatHelper.SendInfo方法的具体用法?Java PlayerChatHelper.SendInfo怎么用?Java PlayerChatHelper.SendInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eu.usrv.yamcore.auxiliary.PlayerChatHelper
的用法示例。
在下文中一共展示了PlayerChatHelper.SendInfo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: SendHelpToPlayer
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
private void SendHelpToPlayer(ICommandSender pCmdSender)
{
if (!InGame(pCmdSender))
{
PlayerChatHelper.SendPlain(pCmdSender, "[HAZIT] Valid options are: reload|save|listdamagesources|listpotions");
}
else
{
/* PlayerChatHelper.SendInfo(pCmdSender, " /hazarditems addpotion <potionID> <tickDuration> <level>");
PlayerChatHelper.SendInfo(pCmdSender, " /hazarditems adddamage <damageSource> <damageAmount>");
PlayerChatHelper.SendInfo(pCmdSender, " /hazarditems removeitem [all]");
PlayerChatHelper.SendInfo(pCmdSender, "* tickDuration is [seconds*20]");
PlayerChatHelper.SendInfo(pCmdSender, "* damageAmount is a float, where 1.0 equals 1 heart");*/
PlayerChatHelper.SendInfo(pCmdSender, "/hazarditems reload|save|listdamagesources|listpotions");
}
}
示例3: SendHelpToPlayer
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
private void SendHelpToPlayer( ICommandSender pCmdSender )
{
if( !InGame( pCmdSender ) )
{
PlayerChatHelper.SendPlain( pCmdSender, "Command can only be executed ingame" );
}
else
{
PlayerChatHelper.SendInfo( pCmdSender, "Check the readme for usage" );
}
}
示例4: onWrenchRightClick
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
@Override
public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer pPlayer, float aX, float aY, float aZ) {
incSpeedTierOverride();
markDirty();
PlayerChatHelper.SendInfo( pPlayer, String.format( "Machine acceleration changed to x%d", mAccelerateStatic[getSpeedTierOverride()] ));
return true;
}
示例5: toggleDeathInfoForPlayer
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
public void toggleDeathInfoForPlayer(EntityPlayer pEP)
{
UUID tUUID = pEP.getUniqueID();
if (_mDeathDebugPlayers.contains(tUUID))
{
_mDeathDebugPlayers.remove(tUUID);
PlayerChatHelper.SendInfo(pEP, "Death-Debug is now diabled");
}
else
{
_mDeathDebugPlayers.add(tUUID);
PlayerChatHelper.SendInfo(pEP, "Death-Debug is now enabled");
}
}
示例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 /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);
}
}
示例7: SendHelpToPlayer
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
private void SendHelpToPlayer(ICommandSender pCmdSender)
{
if (!InGame(pCmdSender))
{
PlayerChatHelper.SendPlain(pCmdSender, "[CFLS] Valid options are: reload");
}
else
{
PlayerChatHelper.SendInfo(pCmdSender, "/customfuels reload");
}
}
示例8: SendPotionsToPlayer
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
/**
* Send a list of all valid potions to the command sender
* @param pCmdSender
*/
private void SendPotionsToPlayer(ICommandSender pCmdSender)
{
if (!InGame(pCmdSender)) {
PlayerChatHelper.SendPlain(pCmdSender, "[HAZIT] List of known Potions; Name(ID)");
} else {
PlayerChatHelper.SendInfo(pCmdSender, "List of known Potions; Name(ID)");
}
StringBuilder tMsg = new StringBuilder(32);
for (Potion p : Potion.potionTypes)
{
if (p == null) {
continue;
}
if (tMsg.length()>0) {
tMsg.append(", ");
}
String t = String.format("%s(%d)", p.getName(), p.id);
if (tMsg.length() + t.length() > 50)
{
if (!InGame(pCmdSender)) {
PlayerChatHelper.SendPlain(pCmdSender, tMsg.toString());
} else {
PlayerChatHelper.SendInfo(pCmdSender, tMsg.toString());
}
tMsg=new StringBuilder(t);
} else {
tMsg.append(t);
}
}
if (!InGame(pCmdSender)) {
PlayerChatHelper.SendPlain(pCmdSender, "[HAZIT] End of list");
} else {
PlayerChatHelper.SendInfo(pCmdSender, "End of list");
}
}
示例9: SendHelpToPlayer
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
private void SendHelpToPlayer(ICommandSender pCmdSender)
{
if (!InGame(pCmdSender))
{
PlayerChatHelper.SendPlain(pCmdSender, "Command can only be executed ingame");
}
else
{
PlayerChatHelper.SendInfo(pCmdSender, "/iih");
}
}
示例10: 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);
}
}
示例11: SendHelpToPlayer
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
private void SendHelpToPlayer(ICommandSender pCmdSender)
{
if (!InGame(pCmdSender))
{
PlayerChatHelper.SendPlain(pCmdSender, "[CTT] Valid options are: reload");
}
else
{
PlayerChatHelper.SendInfo(pCmdSender, "/customtooltips reload");
}
}
示例12: SendHelpToPlayer
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
private void SendHelpToPlayer( ICommandSender pCmdSender )
{
if( !InGame( pCmdSender ) )
{
PlayerChatHelper.SendPlain( pCmdSender, "Command can only be executed ingame" );
}
else
{
PlayerChatHelper.SendInfo( pCmdSender, "/gtnhdebug" );
}
}
示例13: SendHelpToPlayer
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
private void SendHelpToPlayer( ICommandSender pCmdSender )
{
if( !InGame( pCmdSender ) )
{
PlayerChatHelper.SendPlain( pCmdSender, "[CDRP] Valid options are: reload" );
}
else
{
PlayerChatHelper.SendInfo( pCmdSender, "/customdrops reload|toggleinfo" );
}
}
示例14: onMobDrops
import eu.usrv.yamcore.auxiliary.PlayerChatHelper; //导入方法依赖的package包/类
@SubscribeEvent
public void onMobDrops(LivingDropsEvent pEvent)
{
try
{
EntityLivingBase tEntity = pEvent.entityLiving;
UUID tUUID;
EntityPlayer tEP = null;
if (pEvent.source.getEntity() != null)
{
if (pEvent.source.getEntity() instanceof EntityPlayer)
{
tEP = (EntityPlayer) pEvent.source.getEntity();
tUUID = tEP.getUniqueID();
if (_mDeathDebugPlayers.contains(tUUID)) {
PlayerChatHelper.SendInfo(tEP, String.format("Killed entity: [%s]", tEntity.getClass().getName()));
}
}
}
if (tEP == null) // Not doing anything, only players are valid
{
return;
}
if (tEP instanceof FakePlayer) // Nope,
// no
// fakeplayers
{
return;
}
CustomDrops.CustomDrop tCustomDrop = _mCustomDrops.FindDropEntry(tEntity);
if (tCustomDrop == null) {
return; // no custom drop defined for this
}
// mob, skipping
HandleCustomDrops(tCustomDrop, tEntity, tEP, pEvent.drops);
}
catch (Exception e)
{
e.printStackTrace();
}
}
示例15: 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);
}
}