net.labymod.serverapi.Permission.Permission(String,boolean)   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 3
c 1
b 0
f 0
rs 10
cc 1
1
package net.labymod.serverapi;
2
3
/**
4
 * Class created by qlow | Jan
5
 */
6
public enum Permission {
7
8
    // Permissions that are disabled by default
9
    IMPROVED_LAVA( "Improved Lava", false ),
10
    CROSSHAIR_SYNC( "Crosshair sync", false ),
11
    REFILL_FIX( "Refill fix", false ),
12
13
    // GUI permissions
14
    GUI_ALL( "LabyMod GUI", true ),
15
    GUI_POTION_EFFECTS( "Potion Effects", true ),
16
    GUI_ARMOR_HUD( "Armor HUD", true ),
17
    GUI_ITEM_HUD( "Item HUD", true ),
18
19
    // Permissions that are enabled by default
20
    BLOCKBUILD( "Blockbuild", true ),
21
    TAGS( "Tags", true ),
22
    CHAT( "Chat features", true ),
23
    ANIMATIONS( "Animations", true ),
24
    SATURATION_BAR( "Saturation bar", true );
25
26
    private String displayName;
27
    private boolean defaultEnabled;
28
29
    /**
30
     * @param displayName    the permission's display-name
31
     * @param defaultEnabled whether or not this permission is enabled/activated by default
32
     */
33
    Permission( String displayName, boolean defaultEnabled ) {
34
        this.displayName = displayName;
35
        this.defaultEnabled = defaultEnabled;
36
    }
37
38
    public String getDisplayName() {
39
        return displayName;
40
    }
41
42
    public boolean isDefaultEnabled() {
43
        return defaultEnabled;
44
    }
45
}
46