Created
January 25, 2016 14:53
-
-
Save shadowfacts/ad6ceffe188f72d1fc16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.minecraft.util.ChatComponentText; | |
import net.minecraftforge.common.MinecraftForge; | |
import net.minecraftforge.event.ServerSendChatEvent; | |
import net.minecraftforge.fml.common.Mod; | |
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | |
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | |
@Mod(modid = "ServerSendChatTest", version = "1.0") | |
public class ServerSendChatTest { | |
@Mod.EventHandler | |
public void preInit(FMLPreInitializationEvent event) { | |
MinecraftForge.EVENT_BUS.register(this); | |
} | |
@SubscribeEvent | |
public void serverSendChat(ServerSendChatEvent event) { | |
event.setMessage(new ChatComponentText("[Debug]").appendSibling(event.getMessage())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment