Permissions
Overview
The message's key should be "PERMISSIONS".
The data sent must be a JsonObject which basically is a key-value map. The value determines whether the feature is
allowed.
This is the default JsonObject that would be sent if no values have been changed:
In LabyMod 4 some permissions were added.
better_perspective_unlock_camera
- default istrue
- if disabled, the BetterPerspective addons only functions as "F5 Hotkey", thus disabling the ability to freely look around the player.chat_autotext
- default istrue
- if disabled, the autotext functionality of the advanced chat will be removed.entity_marker
- default isfalse
- if enabled, players can add a marker to entities
Requirements
- LabyMod API (or use the Protocol without the API)
Example json
Warning
In LabyMod 4 the chat
, tags
, gui_all
, gui_potion_effects
, gui_armor_hud
and gui_item_hud
permissions were removed.
{
"IMPROVED_LAVA": false,
"CROSSHAIR_SYNC": false,
"REFILL_FIX": false,
"GUI_ALL": true,
"GUI_POTION_EFFECTS": true,
"GUI_ARMOR_HUD": true,
"GUI_ITEM_HUD": true,
"BLOCKBUILD": true,
"TAGS": true,
"CHAT": true,
"ANIMATIONS": true,
"SATURATION_BAR": true,
"RANGE": false,
"SLOWDOWN": false
}
Permission enum
We recommend you to use this enum as a list of all available features:
public enum Permission {
// Permissions that are disabled by default
IMPROVED_LAVA( "Improved Lava", false ),
CROSSHAIR_SYNC( "Crosshair sync", false ),
REFILL_FIX( "Refill fix", false ),
RANGE( "Range", false ), // CLASSIC PVP - 1.16 only
SLOWDOWN( "Slowdown", false ), // CLASSIC PVP - 1.16 only
// GUI permissions
GUI_ALL( "LabyMod GUI", true ), // removed in labymod 4
GUI_POTION_EFFECTS( "Potion Effects", true ), // removed in labymod 4
GUI_ARMOR_HUD( "Armor HUD", true ), // removed in labymod 4
GUI_ITEM_HUD( "Item HUD", true ), // removed in labymod 4
// Permissions that are enabled by default
BLOCKBUILD( "Blockbuild", true ),
TAGS( "Tags", true ), // removed in labymod 4
CHAT( "Chat features", true ), // removed in labymod 4
ANIMATIONS( "Animations", true ),
SATURATION_BAR( "Saturation bar", true ),
// LabyMod 4 Permissions
BETTER_PERSPECTIVE_UNLOCK_CAMERA("Better Perspective - Camera Unlock", true),
CHAT_AUTOTEXT("Advanced Chat AutoText", true),
ENTITY_MARKER("Entity Makers", false);
private String displayName;
private boolean defaultEnabled;
/**
* @param displayName the permission's display-name
* @param defaultEnabled whether or not this permission is enabled/activated by default
*/
Permission( String displayName, boolean defaultEnabled ) {
this.displayName = displayName;
this.defaultEnabled = defaultEnabled;
}
public String getDisplayName() {
return displayName;
}
public boolean isDefaultEnabled() {
return defaultEnabled;
}
}