Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.thvardhan.ytstuff;
- import com.mojang.realmsclient.gui.ChatFormatting;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.event.ClickEvent;
- import net.minecraft.util.ChatComponentText;
- import net.minecraft.util.ChatStyle;
- import net.minecraftforge.fml.common.eventhandler.EventPriority;
- import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
- import net.minecraftforge.fml.common.gameevent.PlayerEvent;
- public class YTEventHandler{
- @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true)
- public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) {
- if(event.player instanceof EntityPlayer){
- ChatComponentText enter=new ChatComponentText(ChatFormatting.AQUA+"You Are Using "+ChatFormatting.GREEN+"YTStuff"+ChatFormatting.RED+" Mod V"+Main.VERSION+" By thvardhan / Serial Player"+ChatFormatting.GREEN);
- ChatComponentText enter1=new ChatComponentText(ChatFormatting.AQUA+"Press Me To Visit To "+ChatFormatting.GREEN+"thvardhan's / SerialPlayer"+ChatFormatting.YELLOW+" Website For More Cool Stuff"+ChatFormatting.GREEN);
- ChatComponentText enter2=new ChatComponentText(ChatFormatting.AQUA+"Press Me To Visit To "+ChatFormatting.GREEN+"thvardhan's / SerialPlayer"+ChatFormatting.YELLOW+" Youtube Channel For More Cool Stuff"+ChatFormatting.GREEN);
- ClickEvent site = new ClickEvent(ClickEvent.Action.OPEN_URL,"http://all-minecraft.weebly.com/");
- ClickEvent site1 = new ClickEvent(ClickEvent.Action.OPEN_URL,"https://www.youtube.com/channel/UCLCDATvGikpHpoC1LsSRm8w");
- ChatStyle s1=new ChatStyle();
- s1.setBold(true);
- s1.setChatClickEvent(site);
- ChatStyle s2=new ChatStyle();
- s2.setBold(true);
- s2.setChatClickEvent(site1);
- enter1.setChatStyle(s1);
- enter2.setChatStyle(s2);
- event.player.addChatMessage(enter);
- event.player.addChatMessage(enter1);
- event.player.addChatComponentMessage(enter2);
- }
- }
- }
Add Comment
Please, Sign In to add comment