本文整理汇总了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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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;
}
}
示例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 ) ) ;
}