package com.alttd.altitudeweb.setup;

import com.alttd.altitudeweb.database.Databases;
import com.alttd.altitudeweb.database.luckperms.TeamMemberMapper;
import com.alttd.altitudeweb.database.luckperms.UUIDUsernameMapper;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class InitializeLuckPerms {

    protected static void init() {
        log.info("Initializing LuckPerms");
        Connection.getConnection(Databases.LUCK_PERMS, (configuration) -> {
            configuration.addMapper(TeamMemberMapper.class);
            configuration.addMapper(UUIDUsernameMapper.class);
        }).join();
        log.debug("Initialized LuckPerms");
    }

}
