This commit is contained in:
jaredlll08 committed 2015-09-05 16:51:51 +02:00
1 parent 5eef72bf61
commit b2b13776f1
73 files changed
+7543

No files matched your search

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package minetweaker.mc18.network;
import minetweaker.MineTweakerAPI;
import minetweaker.MineTweakerImplementationAPI;
import minetweaker.mc18.client.MCClient;
import minetweaker.runtime.providers.ScriptProviderMemory;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
/**
*
* @author Stan
*/
public class MineTweakerLoadScriptsHandler implements IMessageHandler<MineTweakerLoadScriptsPacket, IMessage> {
@Override
public IMessage onMessage(MineTweakerLoadScriptsPacket message, MessageContext ctx) {
if (MineTweakerAPI.server == null) {
MineTweakerAPI.client = new MCClient();
MineTweakerImplementationAPI.setScriptProvider(new ScriptProviderMemory(message.getData()));
MineTweakerImplementationAPI.reload();
}
return null;
}
}