Skip to content

mattbaconz/BetterSettings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โš™๏ธ BetterSettings

A lightweight, API-first player settings management system for Paper/Purpur/Folia servers (1.20.5+)

GitHub release bStats Servers License: MIT Java Paper


โœจ Features

  • ๐ŸŽฏ 50+ Built-in Settings - Communication, display, gameplay, protection, and notification preferences
  • ๐Ÿ”Œ Developer API - Easy-to-use API for third-party plugins to register custom settings
  • ๐ŸŽช Event System - Cancellable pre-toggle and post-change events for deep integration
  • ๐Ÿ“‚ Categorized GUI - Organized settings menu with category navigation and pagination
  • ๐ŸŒ Folia Compatible - Full support for Folia's regionized threading model
  • ๐Ÿ”’ Thread-Safe - Concurrent data access with proper synchronization
  • โšก Async I/O - Non-blocking file operations for optimal performance
  • ๐ŸŽจ Highly Configurable - Customize every aspect via YAML configuration files
  • ๐Ÿชถ Lightweight - Only 92KB! No external plugin dependencies required

๐Ÿš€ Quick Start

  1. ๐Ÿ“ฅ Download BetterSettings-1.0.0.jar from Releases
  2. ๐Ÿ“ Place in your server's plugins folder
  3. ๐Ÿ”„ Start/restart your server
  4. ๐ŸŽฎ Use /settings to open the settings GUI

That's it! Your players can now customize their experience.

๐Ÿ“œ Commands

Command Description Permission
/settings ๐ŸŽฎ Open settings GUI bettersettings.use
/settings reload ๐Ÿ”„ Reload configuration bettersettings.reload
/settings info โ„น๏ธ View plugin information bettersettings.info

Aliases: /setting, /prefs, /preferences

๐Ÿ” Permissions

Permission Description Default
bettersettings.use Access settings GUI โœ… true
bettersettings.reload Reload plugin config ๐Ÿ‘‘ op
bettersettings.info View plugin info ๐Ÿ‘‘ op
bettersettings.* All permissions ๐Ÿ‘‘ op

๐Ÿ“‹ Configuration Files

  • โš™๏ธ config.yml - Main plugin settings
  • ๐ŸŽฏ settings.yml - Configure built-in settings (enable/disable, icons, descriptions)
  • ๐Ÿ’ฌ messages.yml - Customize all user-facing messages
  • โšก performance.yml - Performance tuning (I/O, caching, auto-save)
  • ๐ŸŽจ ui.yml - GUI appearance and layout customization
  • ๐Ÿ“ settings/*.yml - Custom setting definitions (optional)

๐Ÿ“– Full Configuration Guide โ†’

๐ŸŽฏ Built-in Settings

29 Fully Functional Settings + 31 API Framework Settings

๐Ÿ’ฌ Communication (4 working, 5 API-only)

โœ… Global Chat โ€ข โœ… Private Messages โ€ข โœ… Death Messages โ€ข โœ… Join/Leave Messages โ€ข ๐Ÿ”Œ Teleport Requests โ€ข ๐Ÿ”Œ Trade Requests โ€ข ๐Ÿ”Œ Friend Requests โ€ข ๐Ÿ”Œ Chat Mentions โ€ข ๐Ÿ”Œ DM Sound

๐Ÿ‘๏ธ Display (7 working, 8 API-only)

โœ… Scoreboard โ€ข โœ… Player Visibility โ€ข ๐Ÿ”Œ Particle Effects โ€ข ๐Ÿ”Œ Sound Effects โ€ข โœ… Weather โ€ข โœ… Time โ€ข ๐Ÿ”Œ Damage Indicators โ€ข โœ… Night Vision โ€ข ๐Ÿ”Œ AFK Status โ€ข โœ… Vanish โ€ข ๐Ÿ”Œ Block Break Particles โ€ข ๐Ÿ”Œ Scoreboard Numbers โ€ข โœ… Tab List โ€ข ๐Ÿ”Œ Coordinates Display โ€ข ๐Ÿ”Œ Biome Display

๐ŸŽฎ Gameplay (13 working, 2 API-only)

โœ… Auto-Pickup โ€ข โœ… Flight โ€ข โœ… PvP โ€ข โœ… Auto-Sprint โ€ข โœ… Auto-Respawn โ€ข โœ… God Mode โ€ข โœ… Speed Boost โ€ข โœ… Jump Boost โ€ข โœ… Water Breathing โ€ข โœ… Fire Resistance โ€ข โœ… Hunger Loss โ€ข โœ… Item Pickup โ€ข โœ… Entity Collision โ€ข ๐Ÿ”Œ Teleport Cooldown Bypass โ€ข ๐Ÿ”Œ Build Mode

๐Ÿ›ก๏ธ Protection (4 working)

โœ… Drop Protection โ€ข โœ… Inventory Protection โ€ข โœ… Fall Damage โ€ข โœ… Mob Targeting

๐Ÿ”” Notifications (11 API-only)

๐Ÿ”Œ Mob Spawn โ€ข ๐Ÿ”Œ Achievements โ€ข ๐Ÿ”Œ Action Bar โ€ข ๐Ÿ”Œ Boss Bar โ€ข ๐Ÿ”Œ Titles โ€ข ๐Ÿ”Œ Keep Inventory Reminder โ€ข ๐Ÿ”Œ Mob Griefing โ€ข ๐Ÿ”Œ Fire Spread โ€ข ๐Ÿ”Œ Explosions โ€ข ๐Ÿ”Œ Command Spy โ€ข ๐Ÿ”Œ Social Spy

Legend: โœ… = Fully Functional | ๐Ÿ”Œ = API Framework (requires plugin integration)

Note: Settings marked with ๐Ÿ”Œ are placeholders that save player preferences but require integration with other plugins to function. See SETTINGS_STATUS.md for details.

๐Ÿ”Œ Developer API

๐Ÿ“– Full API Documentation โ†’

๐ŸŽฏ Registering a Custom Setting

import com.bettersettings.api.Setting;
import com.bettersettings.api.SettingsRegistry;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

public class MyCustomSetting implements Setting {
    
    @Override
    public String getId() {
        return "myplugin_mysetting";
    }
    
    @Override
    public String getDescription() {
        return "&eToggle My Feature";
    }
    
    @Override
    public ItemStack getIcon(Player player, boolean state) {
        return new ItemStack(Material.DIAMOND);
    }
    
    @Override
    public boolean getDefaultState() {
        return true;
    }
    
    @Override
    public String getPermission() {
        return "myplugin.setting.mysetting";
    }
    
    @Override
    public boolean onToggle(Player player, boolean newState) {
        // Apply the setting effect
        if (newState) {
            // Enable feature
        } else {
            // Disable feature
        }
        return true; // Return false to cancel toggle
    }
}

// Register during plugin initialization
@Override
public void onEnable() {
    SettingsRegistry.getInstance().registerSetting(new MyCustomSetting());
}

๐Ÿ“Š Accessing Player Settings

import com.bettersettings.BetterSettings;
import com.bettersettings.data.PlayerDataManager;

// Get the data manager
PlayerDataManager dataManager = BetterSettings.getInstance().getDataManager();

// Check if a player has a setting enabled
UUID playerId = player.getUniqueId();
boolean isEnabled = dataManager.getSetting(playerId, "bettersettings_chat");

// Set a player's setting (use with caution)
dataManager.setSetting(playerId, "bettersettings_chat", false);

๐ŸŽช Listening to Setting Changes

import com.bettersettings.api.events.PlayerSettingChangeEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

public class MyListener implements Listener {
    
    @EventHandler
    public void onSettingChange(PlayerSettingChangeEvent event) {
        if (event.getSettingId().equals("bettersettings_vanish")) {
            if (event.wasEnabled()) {
                // Player enabled vanish
                hideFromMap(event.getPlayer());
            }
        }
    }
}

โšก Performance

BetterSettings is designed for high-performance servers:

  • ๐Ÿš€ Async I/O - All file operations are non-blocking
  • ๐Ÿ“ฆ Batch Saves - Multiple players saved in single operation
  • ๐Ÿงน Smart Caching - Automatic cleanup of offline player data
  • ๐ŸŽฏ Minimal Overhead - Optimized data structures and algorithms
  • ๐ŸŒ Folia Ready - Proper scheduler usage for regionized threading

โš™๏ธ Recommended Settings

For SSD/NVMe servers:

io:
  async: true
  batch-saves: true
  max-concurrent: 8

For HDD servers:

io:
  async: true
  batch-saves: true
  max-concurrent: 2

๐ŸŽจ Customization

๐Ÿ–ผ๏ธ GUI Layout

Edit ui.yml to customize:

  • GUI size (27 or 54 slots)
  • Items per page
  • Category system (menu or tabs mode)
  • Navigation button positions
  • Colors and icons

๐ŸŽฏ Setting Icons

Edit settings.yml to change icons:

chat:
  icon: PAPER  # Change to any Material name
  description: "&eToggle global chat messages"

๐Ÿ’ฌ Messages

Edit messages.yml to customize all text:

setting-enabled: "&aEnabled: &7{setting}"
setting-disabled: "&cDisabled: &7{setting}"

๐Ÿ“Š Statistics

Track your server's usage on bStats!

๐Ÿ’ฌ Support

๐Ÿค Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines.

๐Ÿ“„ License

MIT License - See LICENSE file for details

๐Ÿ”จ Building from Source

git clone https://github.com/mattbaconz/BetterSettings.git
cd BetterSettings
mvn clean package

The compiled JAR will be in target/BetterSettings-1.0.0.jar

๐Ÿ“ฆ Requirements

  • โ˜• Java 21+
  • ๐Ÿ“„ Paper/Purpur/Folia 1.20.5+
  • โœ… No external plugin dependencies required

Note: BetterSettings is a standalone plugin that only requires the Paper API (provided by your server). Third-party plugins can optionally depend on BetterSettings to integrate with its API.


Made with โค๏ธ by mattbaconz

โญ Star this repo if you find it useful!

About

A lightweight, API-first player settings management system for Paper, Purpur, and Folia servers.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages