Supreme Ventures
  • Welcome to Supreme Ventures
  • Important Information
    • Installation & Setup
    • Configuration Options
      • Commons Config
      • Database Engine
      • Message Formats
      • Custom Styling
      • Configure Numbers
      • Timestamps
    • Developer API
    • Official Discord
    • YAML Validator
  • Freebies
    • 📣ShockMOTD
    • 👻AirHeads
    • 🔗Discord Link
      • Commands & Permissions
      • Placeholders
      • Setting up Discord bots
  • Premium Plugins
    • 💬Chat Core 💲14.49
      • Commands & Permissions
      • Placeholders
    • 🎁Player Gifts 💲7.50
      • Commands & Permissions
    • 💰Premium Credits 💲20.00
      • Commands & Permissions
      • Placeholders
    • ⬇️Voting 💲15.00
      • Commands & Permissions
      • Placeholders
    • 📊Player Stats 💲10.00
      • Commands & Permission
      • Placeholders
    • 🛡️SMP Guilds 💲20.00
      • Commands & Permissions
      • Placeholders
      • Developer API
    • ⬆️Player Levels 💲10.00
      • Commands & Permissions
      • Placeholders
      • Placeholder Scripts
  • Libraries
    • 📘Commons
Powered by GitBook
On this page
  • Nerd Talk...
  • Actual Reason For This Page...

Was this helpful?

  1. Important Information
  2. Configuration Options

Configure Numbers

Additional info about Gucci's unique number configurations

PreviousCustom StylingNextTimestamps

Last updated 9 months ago

Was this helpful?

Nerd Talk...

As part of our commitment to allowing its customers to create the most unique experience possible with our plugins, we needed to create a custom solution to a common issue we had with configuring numbers while trying to create clean & maintainable code. For those who aren't Java developers, here's a quick rundown... Numbers in Java come in a range of flavors. The most common being Integer which covers any positive, or negative number between 0 & (4 bytes of memory). Integers also only cover whole numbers. This leads to the second most common, Double which can store any positive or negative, decimal or whole number between 0 & 1.79^308

The issue with this is that when you serialize (save) a number of a specific type to a standard format like a config file, it can lose its precision and also can cause a headache for the customer as you have no idea the bounds of the value you are editing. Gucci solves this by saving all number config values in a format that includes a short suffix identifying the runtime type & allows users to know the bounds of the value they are editing.

Basically, different number types use different amounts of memory. We try to save the most memory possible and use the correct data types for the task at hand. This creates weird number limitations when configuring, so we added suffixes & config validation to limit these numbers.

Actual Reason For This Page...

Configs serialize (save to file) in a format that translates any number into an easy-to-define format.

Config Version
Mapped Type
Min-Max Values

example: "0.01"

Double (no suffix)

example: "0.01F"

Float (F suffix)

example: "1"

Integer (no suffix, no .)

example: "1L"

Long (L suffix)

example: "1S"

Short (S suffix)

example: "1B"

Byte (B suffix)

This does not mean you can change the data types as you wish. The type defined in the default config must be the same as it is when it is created.

Any
Number possible.
+/-3.40282347×10^38
-2^31 -> 2^31-1
-2^63 -> 2^63-1
-32,763 -> 32,767
-128 -> 127