Server Sponsor
A simple client-side Fabric mod for modpack creators. It adds a customizable server hosting button to the main menu right next to the Multiplayer button.Features
- Main Menu Integration: Places a clean partner button on the title screen next to the Multiplayer button.
- In-Game Popup: Clicking the button opens a clean dialog showing your discount code and partner link.
- One-Click Copy: Lets players copy the code and open the link automatically.
- Simple Config: Edit button text, popup messages, code, button width, and URLs directly in
config/server_sponsor.json.
Config Example (`config/server_sponsor.json`)You can change
{
"configVersion": 3, // Config version (used internally by the mod, do not change).
"buttonText": "Server Hosting -25%", // Text displayed on the main menu sponsor button.
"buttonWidth": 120, // Button width in pixels.
"xOffset": 0, // Horizontal position offset (left/right position adjustment).
"yOffset": 0, // Vertical position offset (up/down position adjustment).
"popupTitle": "Shockbyte Server Hosting",// Title of the popup window displayed after clicking the button.
"popupDescription": "Get 25% OFF using code: {code}", // Popup message ({code} dynamically pulls the value from "discountCode").
"copyAndOpenText": "Copy Code & Open Site", // Button label to copy the promo code to the clipboard and open the link.
"openOnlyText": "Open Site Only", // Button label to open the website directly without copying the code.
"cancelText": "Cancel", // Button label to close the popup window.
"discountCode": "YUSUFEMIN", // Custom promo or affiliate code.
"targetUrl": "https://shockbyte.com/partner/yusufemin" // Partner/referral link to open in browser.
}
Configuration Options Documentation
configVersion: Internal versioning identifier for the config file.
buttonText: The text displayed on the main menu sponsor button.
buttonWidth: Width of the button in pixels.
xOffset: Horizontal offset in pixels to adjust button position on the main menu.
yOffset: Vertical offset in pixels to adjust button position on the main menu.
popupTitle: The heading text at the top of the popup modal.
popupDescription: The body text of the popup. Includes {code} placeholder which automatically gets replaced by the discountCode value.
copyAndOpenText: Text for the primary action button that copies the promo code and opens the target URL in the default browser.
openOnlyText: Text for the secondary button that opens the URL without modifying the clipboard.
cancelText: Text for the button that dismisses the popup window.
discountCode: The discount or promo code assigned to your partnership.
targetUrl: The affiliate or landing page URL to redirect users to.
https://github.com/Yusuf7681/server_sponsor_minecraft_mod