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
Show notifications when a friend comes online
Show the option to open singleplayer worlds to friends
Block all of Essential’s notifications
messageReceivedNotifications
Show notifications when the player receives a direct message
groupMessageReceivedNotifications
Show notifications when the player receives a message from a group
Play a sound when the player receives a message
Privacy & Sharing
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
Share the player’s current server with friends
Disable all notifications and notification sounds
UI & Display
showEssentialIndicatorOnTab
Show an icon in the tab list on players using Essential
showEssentialIndicatorOnNametag
Show an icon on the name tags of players using Essential
Display a notification modal after Essential has updated
The multiplayer tab the player last used:
0 = Favourite servers
1 = Servers with friends on them
2 = Discover servers
Zoom Features
Use the cinematic camera when zooming
Zoom key toggles zoom (instead of holding down the key)
Discord Integration
Enables Discord Rich Presence
Enables Discord’s Ask To Join feature
discordShowUsernameAndAvatar
Shows the user’s username and avatar on the rich presence
Shows the server that the user is connected to on their rich presence
Screenshots
Enable Essential’s screenshot manager
Play a sound when capturing a screenshot
enableVanillaScreenshotMessage
Whether the vanilla screenshot message is sent in chat on capture
Other Settings
hideCosmeticsWhenServerOverridesSkin
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.
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
Automatically refresh the active session if it’s expired when connecting to a server
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.