本文整理汇总了Java中eu.usrv.yamcore.auxiliary.PlayerChatHelper.SendPlain方法的典型用法代码示例。如果您正苦于以下问题:Java PlayerChatHelper.SendPlain方法的具体用法?Java PlayerChatHelper.SendPlain怎么用?Java PlayerChatHelper.SendPlain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eu.usrv.yamcore.auxiliary.PlayerChatHelper
的用法示例。
在下文中一共展示了PlayerChatHelper.SendPlain方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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");
}
}
示例2: 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" );
}
}
示例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 /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);
}
}
示例4: 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");
}
}
示例5: 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");
}
}
示例6: 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");
}
}
示例7: 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");
}
}
示例8: 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);
}
}
示例9: 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");
}
}
示例10: 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" );
}
}
示例11: 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" );
}
}
示例12: 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);
}
}