Created
September 27, 2016 07:51
-
-
Save portablejim/4be779d16c65308f6c73f9f8cdb8acca 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
package portablejim.hc; | |
import net.minecraft.init.Blocks; | |
import net.minecraft.server.MinecraftServer; | |
import net.minecraft.server.integrated.IntegratedServer; | |
import net.minecraftforge.fml.common.FMLCommonHandler; | |
import net.minecraftforge.fml.common.Mod; | |
import net.minecraftforge.fml.common.Mod.EventHandler; | |
import net.minecraftforge.fml.common.event.FMLInitializationEvent; | |
import net.minecraftforge.fml.common.event.FMLServerStartedEvent; | |
import net.minecraftforge.fml.server.FMLServerHandler; | |
@Mod(modid = HardcoreCheater.MODID, version = HardcoreCheater.VERSION) | |
public class HardcoreCheater | |
{ | |
public static final String MODID = "hardcorecheater"; | |
public static final String VERSION = "1.0"; | |
@SuppressWarnings("unused") | |
@EventHandler | |
public void serverStart(FMLServerStartedEvent event) { | |
MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); | |
if(server.isSinglePlayer() && server.isHardcore()) { | |
server.getPlayerList().setCommandsAllowedForAll(true); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment