Back to mods
[API/Library] Queue API project artwork

Vintage Story Mod DB · Vintage Story mod

[API/Library] Queue API

This is a mod is to be used as a dependency for other mods. If you are not a mod developer, you probably don't care about this description . The mod hooks into the vanilla join queue logic and delegates all queue handling functionality to QueueAPI.QueueAPIMod

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which [API/Library] Queue API release should I use?

Updated 9 months ago
Latest stable file 1.0.0
Game version 1.21.5
Loader Built-in Vintage Story mod system

[API/Library] Queue API 1.0.0 targets 1.21.5. Do not install it on the client. It must be installed on the dedicated server. No extra mods listed for this file.

Where it goes

Is [API/Library] Queue API required on the client, server, or both?

Do not install it on the client. It must be installed on the dedicated server.

Client Not supported
Dedicated server Required
Loader for this release Built-in Vintage Story mod system
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This Vintage Story file is marked server-only.

What else does [API/Library] Queue API 1.0.0 need?

1.0.0. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add [API/Library] Queue API without breaking your instance.

Built for [API/Library] Queue API 1.0.0. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.0.0. It targets 1.21.5; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Do not install it on the client. It must be installed on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.0.0. It opens that exact file at the source.

About this project

What does [API/Library] Queue API add?

This is a mod is to be used as a dependency for other mods. If you are not a mod developer, you probably don't care about this description .


 

The mod hooks into the vanilla join queue logic and delegates all queue handling functionality to QueueAPI.QueueAPIModSystem.Handler.

 

Basic Usage
Create an implementation of QueueAPI.Handlers.IJoinQueueHandler and assign it to QueueAPI.Handlers.IJoinQueueHandler during StartServerSide(ICoreServerAPI api).

 

Examples:
There are a few samples handlers in the src/SampleHandlers directory but here is a short demonstration.

public override void StartServerSide(ICoreServerAPI api)
{
    api.ModLoader.GetModSystem<QueueAPIModSystem>().Handler = new DummyJoinQueueHandler();
}

 

/// <summary>
/// A simply <see cref="IJoinQueueHandler"/> implementation that simply kicks all joining players immediately.
/// </summary>
public class DummyJoinQueueHandler : IJoinQueueHandler
{
    public int JoinedPlayerCount => 0;
    
    public int QueueSize => 0;
    
    public int GetClientQueueIndex(int clientId) => -1;
    
    public QueuedClient? GetClientAtQueueIndex(int index) => null;

    public QueuedClient? GetNextQueuedClient(bool remove) => null;

    public IJoinQueueHandler.IPlayerConnectResult OnPlayerConnect(Packet_ClientIdentification clientIdentPacket, ConnectedClient client, string entitlements)
    {
        return new IJoinQueueHandler.IPlayerConnectResult.Disconnect("Kicked by the DummyJoinQueueHandler.");
    }

    public void OnPlayerDisconnect(ConnectedClient disconnectingClient) { }

    public void SendPositionUpdate() { }

    public void Reset() { }
}

I may add features for more fine grained control over the queue in the future but for now it's just QueueAPI.Handlers.IJoinQueueHandler.

Project description from Vintage Story Mod DB.

Pick your setup

[API/Library] Queue API releases for each Vintage Story version.

Choose the version and loader you play, then open the matching release.

1 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

[API/Library] Queue API versions and loaders

1 of 1 releases match

Looking for an older file? The official Vintage Story Mod DB project page is in Resources.