-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long Config Value Locked at Lower Value #44
Comments
I'm trying some other values to see what happens. Lower values seem to stay the same as expected, but larger values get shifted around somewhat. 118425285872872652 gets changed into 118425285872872656, for example. |
A working solution is to write the long as a string in the json. Dazzleconf reads it as a long just fine. Although when the config is loaded, it converts it back to a long and gets rid of the quotation marks around the channel value. This can be worked around using the following code: default long channel()
{
return Long.parseLong(this.channelString());
}
@ConfKey("channel")
@ConfDefault.DefaultString("0")
String channelString(); |
This is very odd. May I ask you to try the following things?
String text = "1184252858728726529";
long value = NumberFormat.getInstance().parse(text);
System.out.println(value);
|
Very weird problem I'm encountering. I'm using the Gson extension for dazzleconf. I have the following value in my config interface (HexCrawlerConfig):
In my .json config file it is defined like so:
Whenever my config is loaded, it changes the value to be 1 less:
If I leave it at this new value it chose for it, it stays like this every time I load up. When I set it back to the original value, it overrides it back to this value... Something I figured I'd try was just set the value to be 1 greater than what I need it to be, but it still locks the value to the one with the 8 at the end.
Here is how I am loading the config itself:
The text was updated successfully, but these errors were encountered: