package com.alterdekim.game.component.game;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum RoleFlags {
    NONE(0),
    MEMBER(2),
    BOSS(4),
    SA(8),
    MODERATOR(131072),
    ADMINISTRATOR(262144),
    CHIEF(524288),
    HIDDEN(1048576);

    private final Integer value;

    public static RoleFlags fromId(int id) {
        for (RoleFlags type : values()) {
            if (type.value == id) {
                return type;
            }
        }
        return RoleFlags.NONE;
    }
}
