我有一个eventhandler类,我正在尝试将消息聊天到服务器聊天,一旦加载,然而,WorldEvent.Load似乎永远不会被调用!代码:
package com.dropthevase.motdchanger;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ChatComponentText;
import net.minecraftforge.event.world.WorldEvent;
public class EventHandler {
@SubscribeEvent
public void onLoad(WorldEvent.Load event)
{
System.out.println("testing");
MinecraftServer.getServer().addChatMessage(new ChatComponentText("MOTDChanger started."));
}
}