Skip to main content

Overview

The EssentialConfig interface provides programmatic access to Essential’s settings menu options. You can read and modify user preferences for notifications, privacy, UI features, and more.

Interface Definition

package gg.essential.api.config

interface EssentialConfig {
    // Social & Notifications
    var friendConnectionStatus: Boolean
    var openToFriends: Boolean
    var disableAllNotifications: Boolean
    var messageReceivedNotifications: Boolean
    var groupMessageReceivedNotifications: Boolean
    var messageSound: Boolean
    
    // UI & Display
    var updateModal: Boolean
    var showEssentialIndicatorOnTab: Boolean
    var showEssentialIndicatorOnNametag: Boolean
    
    // Privacy & Sharing
    var sendServerUpdates: Boolean
    var friendRequestPrivacy: Int
    var streamerMode: Boolean
    
    // Interface State
    var currentMultiplayerTab: Int
    
    // Warnings & Confirmations
    var modCoreWarning: Boolean
    var linkWarning: Boolean
    
    // Zoom Features
    var zoomSmoothCamera: Boolean
    var smoothZoomAnimation: Boolean
    var toggleToZoom: Boolean
    
    // Session Management
    var autoRefreshSession: Boolean
    
    // Display Settings
    var windowedFullscreen: Boolean // MC < 1.14 only
    
    // Discord Integration
    var discordRichPresence: Boolean
    var discordAllowAskToJoin: Boolean
    var discordShowUsernameAndAvatar: Boolean
    var discordShowCurrentServer: Boolean
    
    // Cosmetics
    var hideCosmeticsWhenServerOverridesSkin: Boolean
    
    // Screenshots
    var essentialScreenshots: Boolean
    var screenshotSounds: Boolean
    var enableVanillaScreenshotMessage: Boolean
    
    // Formatting
    var timeFormat: Int
    
    // Deprecated properties (omitted)
}

Properties

Social & Notifications

friendConnectionStatus
Boolean
Show notifications when a friend comes online
openToFriends
Boolean
Show the option to open singleplayer worlds to friends
disableAllNotifications
Boolean
Block all of Essential’s notifications
messageReceivedNotifications
Boolean
Show notifications when the player receives a direct message
groupMessageReceivedNotifications
Boolean
Show notifications when the player receives a message from a group
messageSound
Boolean
Play a sound when the player receives a message

Privacy & Sharing

friendRequestPrivacy
Int
The player’s friend request privacy level:
  • 0 = Anyone can send friend requests
  • 1 = Only friends of friends can send friend requests
  • 2 = Nobody can send friend requests
sendServerUpdates
Boolean
Share the player’s current server with friends
streamerMode
Boolean
Disable all notifications and notification sounds

UI & Display

showEssentialIndicatorOnTab
Boolean
Show an icon in the tab list on players using Essential
showEssentialIndicatorOnNametag
Boolean
Show an icon on the name tags of players using Essential
updateModal
Boolean
Display a notification modal after Essential has updated
currentMultiplayerTab
Int
The multiplayer tab the player last used:
  • 0 = Favourite servers
  • 1 = Servers with friends on them
  • 2 = Discover servers

Zoom Features

zoomSmoothCamera
Boolean
Use the cinematic camera when zooming
smoothZoomAnimation
Boolean
Animate zooming in
toggleToZoom
Boolean
Zoom key toggles zoom (instead of holding down the key)

Discord Integration

discordRichPresence
Boolean
Enables Discord Rich Presence
discordAllowAskToJoin
Boolean
Enables Discord’s Ask To Join feature
discordShowUsernameAndAvatar
Boolean
Shows the user’s username and avatar on the rich presence
discordShowCurrentServer
Boolean
Shows the server that the user is connected to on their rich presence

Screenshots

essentialScreenshots
Boolean
Enable Essential’s screenshot manager
screenshotSounds
Boolean
Play a sound when capturing a screenshot
enableVanillaScreenshotMessage
Boolean
Whether the vanilla screenshot message is sent in chat on capture

Other Settings

hideCosmeticsWhenServerOverridesSkin
Boolean
When enabled and the server overrides a skin, all cosmetics will be hidden on that player. Useful for game-modes like Hypixel Murder Mystery where cosmetics could provide an advantage.
modCoreWarning
Boolean
Show the player a warning popup when they are using ModCore
Show the player a confirmation modal before opening a link to a trusted host
autoRefreshSession
Boolean
Automatically refresh the active session if it’s expired when connecting to a server
timeFormat
Int
Choose between using 12 or 24 hour time for dates/timestamps:
  • 0 = 12 hour time (03:00 AM, 03:00 PM)
  • 1 = 24 hour time (03:00, 15:00)

Usage Examples

Reading Configuration Values

import gg.essential.api.EssentialAPI;
import gg.essential.api.config.EssentialConfig;

public class ConfigExample {
    public void checkNotificationSettings() {
        EssentialConfig config = EssentialAPI.getConfig();
        
        if (config.getDisableAllNotifications()) {
            System.out.println("Notifications are disabled");
        }
        
        if (config.getStreamerMode()) {
            System.out.println("Streamer mode is active");
        }
    }
}

Modifying Configuration Values

import gg.essential.api.EssentialAPI;
import gg.essential.api.config.EssentialConfig;

public class ConfigModifier {
    public void enableStreamerMode() {
        EssentialConfig config = EssentialAPI.getConfig();
        
        // Enable streamer mode
        config.setStreamerMode(true);
        
        // This will also disable notifications
        System.out.println("Streamer mode enabled");
    }
    
    public void setPrivacySettings() {
        EssentialConfig config = EssentialAPI.getConfig();
        
        // Set friend request privacy to friends of friends only
        config.setFriendRequestPrivacy(1);
        
        // Disable server updates
        config.setSendServerUpdates(false);
    }
}

Kotlin Example

import gg.essential.api.EssentialAPI

fun configureDiscordRichPresence() {
    val config = EssentialAPI.getConfig()
    
    config.discordRichPresence = true
    config.discordShowCurrentServer = true
    config.discordShowUsernameAndAvatar = true
    config.discordAllowAskToJoin = false
    
    println("Discord Rich Presence configured")
}

Checking Privacy Level

import gg.essential.api.EssentialAPI;
import gg.essential.api.config.EssentialConfig;

public class PrivacyChecker {
    public String getFriendRequestPrivacyLevel() {
        EssentialConfig config = EssentialAPI.getConfig();
        
        return switch (config.getFriendRequestPrivacy()) {
            case 0 -> "Anyone";
            case 1 -> "Friends of friends";
            case 2 -> "Nobody";
            default -> "Unknown";
        };
    }
}

Notes

Some properties are marked as deprecated and no longer have any effect. Avoid using deprecated properties in new code.
Changes to configuration values are persisted and will affect the user’s Essential settings. Use with care and consider user preferences.
When modifying user settings programmatically, consider providing UI feedback or asking for user consent first.

Build docs developers (and LLMs) love