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


Java EntityPlayerMP.addChatMessage方法代码示例

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


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

示例1: sendMessageToAllTeamMembers

import net.minecraft.entity.player.EntityPlayerMP; //导入方法依赖的package包/类
public void sendMessageToAllTeamMembers(EntityPlayer player, IChatComponent message)
{
    Team team = player.getTeam();

    if (team != null)
    {
        for (String s : team.getMembershipCollection())
        {
            EntityPlayerMP entityplayermp = this.getPlayerByUsername(s);

            if (entityplayermp != null && entityplayermp != player)
            {
                entityplayermp.addChatMessage(message);
            }
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:ServerConfigurationManager.java

示例2: sendMessageToTeamOrEvryPlayer

import net.minecraft.entity.player.EntityPlayerMP; //导入方法依赖的package包/类
public void sendMessageToTeamOrEvryPlayer(EntityPlayer player, IChatComponent message)
{
    Team team = player.getTeam();

    if (team == null)
    {
        this.sendChatMsg(message);
    }
    else
    {
        for (int i = 0; i < this.playerEntityList.size(); ++i)
        {
            EntityPlayerMP entityplayermp = (EntityPlayerMP)this.playerEntityList.get(i);

            if (entityplayermp.getTeam() != team)
            {
                entityplayermp.addChatMessage(message);
            }
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:22,代码来源:ServerConfigurationManager.java

示例3: sendMessageToAllTeamMembers

import net.minecraft.entity.player.EntityPlayerMP; //导入方法依赖的package包/类
public void sendMessageToAllTeamMembers(EntityPlayer player, ITextComponent message)
{
    Team team = player.getTeam();

    if (team != null)
    {
        for (String s : team.getMembershipCollection())
        {
            EntityPlayerMP entityplayermp = this.getPlayerByUsername(s);

            if (entityplayermp != null && entityplayermp != player)
            {
                entityplayermp.addChatMessage(message);
            }
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:18,代码来源:PlayerList.java

示例4: sendMessageToTeamOrAllPlayers

import net.minecraft.entity.player.EntityPlayerMP; //导入方法依赖的package包/类
public void sendMessageToTeamOrAllPlayers(EntityPlayer player, ITextComponent message)
{
    Team team = player.getTeam();

    if (team == null)
    {
        this.sendChatMsg(message);
    }
    else
    {
        for (int i = 0; i < this.playerEntityList.size(); ++i)
        {
            EntityPlayerMP entityplayermp = (EntityPlayerMP)this.playerEntityList.get(i);

            if (entityplayermp.getTeam() != team)
            {
                entityplayermp.addChatMessage(message);
            }
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:22,代码来源:PlayerList.java

示例5: canBuy

import net.minecraft.entity.player.EntityPlayerMP; //导入方法依赖的package包/类
@Override
public boolean canBuy(EntityPlayerMP serverPlayer, int amount) {
	
	if ( ( ( WorldProtectionPlugin ) PluginHelper . getPlugin ( "worldProtectionManager" ) ) . checkRegionMaxOut ( this . world_name, serverPlayer.getGameProfile().getId() ) ) {

		serverPlayer . addChatMessage ( new ChatComponentText ( "You can't have more regions!" ) ) ;

		return false ;
		
	} else {
				   
		return true;
           
	}

}
 
开发者ID:Pishka,项目名称:MineDonate,代码行数:17,代码来源:RegionInfo.java

示例6: sendModMessage

import net.minecraft.entity.player.EntityPlayerMP; //导入方法依赖的package包/类
public static void sendModMessage ( EntityPlayerMP player, String msg ) {
	
    player . addChatMessage ( new ChatComponentText ( EnumChatFormatting . AQUA + " [MineDonate] " + EnumChatFormatting . RESET + msg ) ) ;
    
}
 
开发者ID:Pishka,项目名称:MineDonate,代码行数:6,代码来源:Utils.java


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