Minecraft Forge 1.7.10:WorldEvent.load无法正常工作?

时间:2017-04-17 20:59:01

标签: java loading minecraft-forge

我有一个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."));
    }
}

0 个答案:

没有答案