use of net.minecraft.util.ChatComponentTranslation in project Tale-of-Kingdoms by Ivasik78.
the class EntityStockKeeper method interact.
@Override
public boolean interact(EntityPlayer player) {
if (this.canInteractWith(player)) {
if (!this.worldObj.isRemote) {
this.heal(100.0F);
player.addChatMessage(new ChatComponentTranslation("npc.stockKeeper.dialog"));
}
player.openGui(TaleOfKingdoms.instance, GUI_STOCK, worldObj, 0, 0, 0);
}
return true;
}
use of net.minecraft.util.ChatComponentTranslation in project Tale-of-Kingdoms by Ivasik78.
the class EntityLumber method interact.
@Override
public boolean interact(EntityPlayer player) {
if (this.canInteractWith(player)) {
if (!this.worldObj.isRemote) {
this.heal(100.0F);
player.addChatMessage(new ChatComponentTranslation("npc.foreman.dialog"));
}
player.openGui(TaleOfKingdoms.instance, GUI_LUMBER, worldObj, 0, 0, 0);
}
return true;
}
use of net.minecraft.util.ChatComponentTranslation in project Tale-of-Kingdoms by Ivasik78.
the class EntityMageKeeper method interact.
@Override
public boolean interact(EntityPlayer player) {
if (this.canInteractWith(player)) {
if (!worldObj.isRemote) {
this.heal(100.0F);
player.addChatMessage(new ChatComponentTranslation("npc.headMage.dialog"));
}
player.openGui(TaleOfKingdoms.instance, GUI_MAGEHALL, worldObj, 0, 0, 0);
}
return true;
}
use of net.minecraft.util.ChatComponentTranslation in project Tale-of-Kingdoms by Ivasik78.
the class SPacketAdd method server.
@Override
public void server(EntityPlayerMP player) {
ItemStack stack = ByteBufUtils.readItemStack(buf());
stack.stackSize = buf().readInt();
if (!player.inventory.addItemStackToInventory(stack))
player.entityDropItem(stack, 0);
player.addChatMessage(new ChatComponentTranslation(ByteBufUtils.readUTF8String(buf())));
}
use of net.minecraft.util.ChatComponentTranslation in project Galacticraft by micdoodle8.
the class NEIServerUtils method sendNotice.
public static void sendNotice(ICommandSender sender, IChatComponent msg, String permission) {
ChatComponentTranslation notice = new ChatComponentTranslation("chat.type.admin", sender.getName(), msg.createCopy());
notice.getChatStyle().setColor(EnumChatFormatting.GRAY).setItalic(true);
if (NEIServerConfig.canPlayerPerformAction("CONSOLE", permission)) {
MinecraftServer.getServer().addChatMessage(notice);
}
for (EntityPlayer p : ServerUtils.getPlayers()) {
if (p == sender) {
p.addChatComponentMessage(msg);
} else if (NEIServerConfig.canPlayerPerformAction(p.getName(), permission)) {
p.addChatComponentMessage(notice);
}
}
}
Aggregations