sGens - The Ultimate Gens Tycoon Plugin The perfect, lag-free, and fully customizable generator plugin for your Gens Tycoon server.
What is sGens? sGens is a powerful generator plugin built from the ground up with performance and customization in mind. It allows players to place generators that produce items, which they can then sell to earn money, level up, and upgrade their generators to become the ultimate tycoon on your server. Every feature is designed to be lag-free and highly configurable to fit your server's unique economy.
Features
Unlimited Generators & Tiers: Create as many types of generators as you want in the config, each with unlimited upgrade tiers.
Lag-Free Design: Optimized item spawning and asynchronous tasks ensure your server runs smoothly, even with hundreds of generators.
Fully Customizable GUI Shop: An easy-to-use `/gens shop` where players can buy generators. All items, names, and prices are configurable.
Upgrade System: Players can right-click their generators to open an upgrade menu, showing current and next-tier stats.
Level System: Players earn XP by collecting or selling items, unlocking higher-tier generator upgrades.
Corrupted Generators: To combat AFK farming, generators have a configurable chance to "corrupt" and stop working until repaired for a fee, keeping players engaged.
Sell Wands: Customizable sell wands allow players to quickly sell the contents of chests for money, with prices defined in a dedicated `prices.yml`.
Hologram Support:Requires DecentHolograms. Display beautiful, informative holograms above each generator showing its name and tier.
Hex Color Support: Use `&#RRGGBB` color codes throughout the configuration for modern, stylish text.
Automatic Update Checker: Notifies you in the console when a new version of sGens is available on SpigotMC.
Powerful Developer API: Includes custom events like `GeneratorPlaceEvent`, `GeneratorBreakEvent`, `GeneratorUpgradeEvent`, and more, allowing other plugins to easily and safely integrate with sGens.
Commands & Permissions
Player Commands:
/gens shop - Opens the generator shop. (`sgens.user`)
/gens level - Checks your current level and XP. (`sgens.user`)
Admin Commands:
/gens give <player> <type> [amount] - Gives a player a generator. (`sgens.admin`)
/gens getwand - Gives you a sell wand. (`sgens.admin`)
/gens addxp <player> <amount> - Adds XP to a player. (`sgens.admin`)
/gens corrupt - Manually corrupts the generator you are looking at. (`sgens.admin`)
/gens reload - Reloads the plugin's configuration files. (`sgens.admin`)
# Set to false to disable checking for new plugin versions on startup. update-checker: true
# A prefix that can be used in messages. # Example: '&8[&6sGens&8] &7Welcome!' plugin-prefix: "&8[&6OFF&lSijBFE&lGF7DFD&lEF7DFD&lNF7DFD&lS&8] "
# Leveling settings leveling: # How much XP should a player get for every $1 worth of items they pick up? # Example: If an item is worth $100 and this is 0.1, they get 10 XP. # Example: If an item is worth $100 and this is 1.0, they get 100 XP. xp-per-dollar: 0.1
# Settings for corrupted generators corruption-settings: # The chance (out of 1.0) for a generator to get corrupted EACH second. # 0.0001 is a 0.01% chance per second. # A higher number means generators corrupt more often. chance-per-second: 0.0001
# The cost to repair is calculated as: # (Tier 1 Price * multiplier) * Generator's Current Tier # Example with multiplier 0.1 and Tier 1 price of 1000: # Tier 1 Repair Cost: (1000 * 0.1) * 1 = $100 # Tier 5 Repair Cost: (1000 * 0.1) * 5 = $500 repair-cost-multiplier: 0.1
# Hologram settings holograms:
enabled: true
# Height above the generator block where the hologram will appear. height: 2.0
# You can use placeholders: # %generator_name% - The display name of the generator # %tier% - The current tier of the generator lines: -
"%generator_name%" -
"HFF→ &fʀɪɢʜᴛ-ᴄʟɪᴄᴋ ᴛᴏ ᴜᴘɢʀᴀᴅᴇ. HFF← " - "&7ᴛɪᴇʀ: &e%tier%" corrupted-lines: -
"&4&lCORRUPTED" -
"&cᴛʜɪѕ ɢᴇɴᴇʀᴀᴛᴏʀ ɪѕ ʙʀᴏᴋᴇɴ!" -
"&cʀɪɢʜᴛ-ᴄʟɪᴄᴋ ᴛᴏ ʀᴇᴘᴀɪʀ." -
"" # plugin messages can be configured here messages:
reload: "%prefix%&aPlugin has been reloaded successfully!" level-up: "%prefix%&a&lLEVEL UP! &7You are now level &e%level%&7!"
# sGens Item Prices # Define the sell price for each item material here. prices:
COAL: 5.0
IRON_INGOT: 25.0
GOLD_INGOT: 50.0
DIAMOND: 100.0
EMERALD: 125.0
NETHERITE_INGOT: 1000.0
WHEAT: 1.0
CARROT: 1.5
POTATO: 1.5
Developer API sGens is built to be expandable. If you're a developer, you can easily hook into our plugin.
Get the API Instance:
Code (Java):
SGensAPI sGensApi
= SGens.
getApi();
Listen to Custom Events:
Code (Java):
@EventHandler
publicvoid onGeneratorUpgrade
(GeneratorUpgradeEvent event
){ Player player
= event.
getPlayer(); Generator generator
= event.
getGenerator();
// Example: Give a player a diamond for upgrading a netherite generator if(generator.
getGeneratorId().
equalsIgnoreCase("netherite_generator")){ player.
sendMessage(ChatColor.
GOLD+"You received a diamond for upgrading the best generator!"); player.
getInventory().
addItem(new ItemStack
(Material.
DIAMOND)); } }
If you have any questions, found a bug, or have a suggestion, feel free to join our
Discord Server or leave a comment in the discussion section!