Jump to content

Kihron

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Kihron's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I am currently trying to find a way to see if something has been opened before by the player. If it is the first time, then show the first time menu, after they complete it, change the value to 1 (Meaning it has been setup/opened before). Thus the next time they open it, it will show the menu that is for a "returning" player. I think this might require player data but I have no idea how to use that. Does anyone have any ideas?
  2. , thanks for your help! I really do appreciate it. I guess its time for waiting.
  3. Hey, I truly am thankful for your help, but sadly it isn't working for me, just a reminder, I'm running 1.8.9 so I don't know if things are different or if you are also testing in that version. This is what I have now, @EventHandler public static void preInit(FMLPreInitializationEvent event) { File configFile = new File(Loader.instance().getConfigDir(), "keymod.cfg"); Configuration config = new Configuration(configFile); config.load(); Property isOn = config.get("test", "test value", 100); int update = isOn.getInt(); if (config.hasChanged()) { config.save(); proxy.registerKeyBindings(); } } I had to make an assumption that the update variable was an int. Sadly, once again when loading the game, under mod options, the config button is grayed out.
  4. Thank you for the reply, I have some questions. @EventHandler public static void preInit(FMLPreInitializationEvent event) { File configFile = new File(Loader.instance().getConfigDir(), "keymod.cfg"); Configuration config = new Configuration(configFile); config.load(); Property update = config.get("Update Checker", "Whether or not the Update Checker runs.", 50); if(config.hasChanged()) config.save(); proxy.registerKeyBindings(); } First, does everything go under preInit? Second, the variables config and update had some errors so I guessed the class for them, are they supposed to be something else? When I ran the game, under mod options, the config didn't load so I don't know if I did this wrong or not.
  5. Hello again, I have been searching and attempting multiple methods on creating configuration files but I have not succeeded at all. My mod has a version checker and I would like to add a config option to disable it. Does anyone know how to create one?
  6. Thanks for your help, I tried PlayerLoggedInEvent but I wasn't sure how to make it show even when you join a server, it only seems to work on Single Player worlds.
  7. Hello! I am creating a Version Checker for my mod but I want the message to display not only in single player worlds, but when you join a server as well. @SubscribeEvent public void onConnectedToServerEvent(FMLNetworkEvent.ClientConnectedToServerEvent event) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("PlaceHolder")); } The problem is that the game can't seem to get the player and returns a Null Pointer Exception. I've tried tons of ways to get around this but I haven't figured one out. Thank you for the help!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.