Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Author

You somehow managed to create a

Configuration

object which's file is null. Since your code is all over the place and you only ever post tiny snippets of it (and I am not going back through 4 pages, no thanks) I do not know where you initialize

Clean.Coins.CC.config1

.

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();
}

  • Replies 90
  • Views 44.1k
  • Created
  • Last Reply

Top Posters In This Topic

  • Author

You initialize the

config1

field to a new, empty

Configuration

object and then don't touch it again. What did you expect?

ย 

And no, you are not touching the field in

preInit

. Look closely.

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);

?

public static Configuration config;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{	
	config = new Configuration(event.getSuggestedConfigurationFile());
}

  • Author

public static Configuration config;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{	
	config = new Configuration(event.getSuggestedConfigurationFile());
}

?

You initialize the

config1

field to a new, empty

Configuration

object and then don't touch it again. What did you expect?

ย 

And no, you are not touching the field in

preInit

. Look closely.

and you asked how to fix it

  • Author

You initialize the

config1

field to a new, empty

Configuration

object and then don't touch it again. What did you expect?

ย 

And no, you are not touching the field in

preInit

. Look closely.

and you asked how to fix it

What is different between your and my code?

yours

public static Configuration config1= new Configuration();
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	Configuration config1= new Configuration(event.getSuggestedConfigurationFile());
}

mine

public static Configuration config;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{	
	config = new Configuration(event.getSuggestedConfigurationFile());
}

spot the difference

  • Author

yours

public static Configuration config1= new Configuration();
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	Configuration config1= new Configuration(event.getSuggestedConfigurationFile());
}

mine

public static Configuration config;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{	
	config = new Configuration(event.getSuggestedConfigurationFile());
}

spot the difference

Oh well, didn't expect that to be the problem, thanks!
Oh well, didn't expect that to be the problem, thanks!

ย 

Because it's only in Local Scope.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.ย  If you think this is the case, JUST REPORT ME.ย  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

ย 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

ย 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Please learn Java... Please.

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!

That is what I am trying to do! ^^

ย 

Modder Support

This is the support section for those modding with Forge. Help with modding goes in here, however, please keep in mind that this is not a Java school. You are expected to have basic knowledge of Java before posting here.

ย 

Emphasis on "You are expected to have basic knowledge of Java before posting here."

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.ย  If you think this is the case, JUST REPORT ME.ย  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

ย 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

ย 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

That is what I am trying to do! ^^

ย 

Modder Support

This is the support section for those modding with Forge. Help with modding goes in here, however, please keep in mind that this is not a Java school. You are expected to have basic knowledge of Java before posting here.

ย 

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?
  • Author

Why do you want that? Just put ยงa in the text...

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

Your file isn't saved in UTF-8 format.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.ย  If you think this is the case, JUST REPORT ME.ย  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

ย 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

ย 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Your file isn't saved in UTF-8 format.

Now there is a smiley in front of it :/. โ˜บ

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.