var scriptName = "StaffAlertLibreCraft";
var scriptAuthor = "By Virus";
var scriptVersion = 1.0;

function StaffAlertModule() {
    var Lobby = value.createBoolean("AutoHub", true);
    this.getName = function() {
        return "StaffAlertLibreCraft";
    }

    this.getDescription = function() {
        return "StaffAlert pa Universocraft";
    }

    this.getCategory = function() {
        return "Misc";
    }

    var putitas = ["lPapiMarcel", "Esquite89", "AlexReq", "roku__", "Kudo", "Acrean", "enzo1612", "LightingKira"] 

    this.onUpdate = function() {        
         playerCollection = mc.getNetHandler().getPlayerInfoMap()
         playerCollection.forEach(function(player) {
            putitas.forEach(function(putitas) {
                if (putitas != mc.getSession().getUsername() && putitas == player.getGameProfile().getName()) {
                    if(mc.thePlayer.ticksExisted % 12 == 0) {
                        if(Lobby.get()) {
                            mc.thePlayer.sendChatMessage("/lobby");
                        }

                        chat.print("§5§lStaff: " + "§5§l " + putitas)

                     
                        
    

                    }
                }
            });

         });

    }

    this.addValues = function(virus) {
        virus.add(Lobby);
    }



}

var staffalertModule = new StaffAlertModule();
var staffalertModuleClient;

function onEnable() {
    staffalertModuleClient = moduleManager.registerModule(staffalertModule);
}

function onDisable() {
    moduleManager.unregisterModule(staffalertModuleClient);
}

