Jump to content

Trusak

Members
  • Posts

    72
  • Joined

  • Last visited

Everything posted by Trusak

  1. It works with the Eclipse Client but when I use the normal Minecraft 1.8.9 client, it deforms. EDIT: The §a deforms into ï¿1/2a
  2. Emphasis on "You are expected to have basic knowledge of Java before posting here." Ye sorry, I will stop asking questions on this forum but can you help me with the last question?
  3. That is what I am trying to do! ^^ One more quick question, is it possible to replace a word in a String with a ChatCode? I tried to do prop = prop.replace("&a", EnumChatFormatting.GREEN); and prop = prop.replace("&a", "§a"); , but the first one isn't working and the second one seems to only work with the Client from Eclipse, not the regular one (Why though?). I am so sorry for being annoying!
  4. Oh well, didn't expect that to be the problem, thanks!
  5. and you asked how to fix it What is different between your and my code?
  6. How to fix that? If I understood that right, I should create the booleans in the config first. Like that: Property PMs = config1.get("Booleans", "PMs", false); ?
  7. public static Configuration config1= new Configuration(); @EventHandler public void preInit(FMLPreInitializationEvent event) { Configuration config1= new Configuration(event.getSuggestedConfigurationFile()); config1.load(); FastExamples.NotResetVariables.PMs = config1.get("Booleans", "PMs", false).getBoolean(); FastExamples.NotResetVariables.instantRejoin = config1.get("Booleans", "InstantRejoin", false).getBoolean(); FastExamples.NotResetVariables.showPartyChat = config1.get("Booleans", "PartyChat", false).getBoolean(); FastExamples.NotResetVariables.showGuildChat = config1.get("Booleans", "GuildChat", false).getBoolean(); config1.save(); proxy.registerClientStuff(); }
  8. I've also tried checking for null before it activates but it is still crashing if(Clean.Coins.CC.config1 != null){ Clean.Coins.CC.config1.save(); } Also, just a random question, does anyone know why String[] splittedMessage = msg.split(")"); isn't working when it is ")" but is working when it is something different?
  9. Yes, I checked that but the line that makes the error is Clean.Coins.CC.config1.save(); and Clean.Coins.CC.config1 != null
  10. After doing everything I got this error: Code: Button: if(button == button25) { boolean State3 = FastExamples.NotResetVariables.PMsEnabled(); Minecraft.getMinecraft().displayGuiScreen(new GUI()); Property prop = Clean.Coins.CC.config1.get("Booleans", "PMs", false); boolean PMs = prop.getBoolean(); prop.set(!PMs); Clean.Coins.CC.config1.save(); } preInit: Configuration config1= new Configuration(event.getSuggestedConfigurationFile()); config1.load(); FastExamples.NotResetVariables.PMs = config1.get("Booleans", "PMs", false).getBoolean(); config1.save();
  11. But Property =/= boolean Like Boolean PMs = config1.getBoolean("Booleans", "PMs", false, ""); ?
  12. That is what I have: { Configuration config1= new Configuration(event.getSuggestedConfigurationFile()); config1.load(); Property PMs = config1.get("Booleans", "PMs", false); config1.save(); and public static boolean PMs; public static boolean PMsEnabled(){ return (PMs = !PMs); } . Also the boolean in the config isn't changing when I use the button
  13. It can't convert from Porperty to Boolean and if I make the boolean a Property it can neither return it nor return !it
  14. Like that: protected void actionPerformed(GuiButton button) throws IOException { if(button == GUI.GUI.button2) { Minecraft.getMinecraft().displayGuiScreen(new GUI2()); Property prop = config1.get("Booleans", "PMs", false); boolean PMs = prop.getBoolean(); prop.set(!PMs);; config1.save(); } } ?
  15. Like that: protected void actionPerformed(GuiButton button) throws IOException { if(button == GUI.GUI.button2) { Minecraft.getMinecraft().displayGuiScreen(new GUI2()); Property prop = config1.get("Booleans", "PMs", false); boolean PMs = prop.getBoolean(); prop.set(!PMs);; config1.save(); } } ?
  16. I know but it is only the name so I don't think I should care about it too much. Can you help me with the config itself? I still don't know what to change and how to change from property to boolean ...Looks at code in earlier post... boolean PMs = prop.getBoolean(); Also remembers... But where do I put which boolean I want it to get?
  17. I know but it is only the name so I don't think I should care about it too much. Can you help me with the config itself? I still don't know what to change and how to change from property to boolean
  18. He is not checking equality. Ah, you are correct. But yes, still nonsense. I am not sure what I am doing wrong. It works fine in-game. The name of your method (PmsEnabled) sounds like a getter method. IE it should just return PMs, but instead it switches the value and returns the new value. So is there anything wrong with my method?
  19. He is not checking equality. Ah, you are correct. But yes, still nonsense. I am not sure what I am doing wrong. It works fine in-game. Yeah I have two of them, PmsEnabled and PmsInfo, I actually want it to be like that public static boolean PMs; public static boolean PMsEnabled(){ return (PMs = !PMs); } public static boolean PMsInfo(){ return (PMs); } I still don't know what to do with So how can I make it work? Make your config variable exist outside local scope. Ok so that is what I have right now: protected void actionPerformed(GuiButton button) throws IOException { if(button == GUI.GUI.button2) { Minecraft.getMinecraft().displayGuiScreen(new GUI2()); Property prop = config1.get("Booleans", "PMs", false); boolean PMs = prop.getBoolean(); prop.set(!PMs);; config1.save(); } } What to do now? Also how can I make that public static boolean PMs; public static boolean PMsEnabled(){ return (PMs = !PMs); } get it's state from the config? now anyway .
×
×
  • Create New...

Important Information

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