This commit is contained in:
parent
3cfcf255fc
commit
efb4023b16
1 changed files with 1 additions and 4 deletions
|
@ -13,9 +13,7 @@ import de.com.baseband.client.util.adapt.Marker;
|
||||||
import net.minecraft.client.gui.ChatLine;
|
import net.minecraft.client.gui.ChatLine;
|
||||||
import net.minecraft.client.gui.GuiNewChat;
|
import net.minecraft.client.gui.GuiNewChat;
|
||||||
import net.minecraft.network.play.server.SPacketChat;
|
import net.minecraft.network.play.server.SPacketChat;
|
||||||
import net.minecraft.util.text.Style;
|
|
||||||
import net.minecraft.util.text.TextComponentString;
|
import net.minecraft.util.text.TextComponentString;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
|
||||||
import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
|
@ -78,8 +76,7 @@ public class ChatExtras extends Feature {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onChat(ClientChatReceivedEvent t) {
|
public void onChat(ClientChatReceivedEvent t) {
|
||||||
if (chatTimestamps) {
|
if (chatTimestamps) {
|
||||||
TextComponentString newTextComponentString = new TextComponentString("[" + new SimpleDateFormat("HH:mm:ss").format(new Date()) + "]" + ChatFormatting.RESET + " ");
|
TextComponentString newTextComponentString = new TextComponentString(ChatFormatting.LIGHT_PURPLE + "[" + new SimpleDateFormat("HH:mm:ss").format(new Date()) + "]" + ChatFormatting.RESET + " ");
|
||||||
newTextComponentString.setStyle(new Style().setColor(TextFormatting.LIGHT_PURPLE));
|
|
||||||
newTextComponentString.appendSibling(t.getMessage());
|
newTextComponentString.appendSibling(t.getMessage());
|
||||||
t.setMessage(newTextComponentString);
|
t.setMessage(newTextComponentString);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue