diff --git a/fml/src/main/java/cpw/mods/fml/server/FMLServerHandler.java b/fml/src/main/java/cpw/mods/fml/server/FMLServerHandler.java index 726d7b3798..5dfcc3ad50 100644 --- a/fml/src/main/java/cpw/mods/fml/server/FMLServerHandler.java +++ b/fml/src/main/java/cpw/mods/fml/server/FMLServerHandler.java @@ -34,6 +34,7 @@ import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; import cpw.mods.fml.common.StartupQuery; import cpw.mods.fml.common.eventhandler.EventBus; +import cpw.mods.fml.common.functions.GenericIterableFactory; import cpw.mods.fml.common.network.FMLNetworkEvent; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; @@ -176,7 +177,7 @@ public class FMLServerHandler implements IFMLSidedHandler // rudimentary command processing, check for fml confirm/cancel and stop commands synchronized (dedServer.pendingCommandList) { - for (Iterator it = dedServer.pendingCommandList.iterator(); it.hasNext(); ) + for (Iterator it = GenericIterableFactory.newCastingIterable(dedServer.pendingCommandList, ServerCommand.class).iterator(); it.hasNext(); ) { String cmd = it.next().command.trim().toLowerCase();