Multi-Login Detector

IntermediateUtility

Detects if you have multiple accounts logged in. Useful for account management.

10 min read

What It Does

Detects if you have multiple accounts logged in. Useful for account management.

Source Code

java
1package com.example;
2
3import net.runelite.api.Client;
4import net.runelite.client.plugins.Plugin;
5import net.runelite.client.plugins.PluginDescriptor;
6import javax.inject.Inject;
7
8@PluginDescriptor(
9    name = "Multi-Login Detector",
10    description = "Detects multiple logins"
11)
12public class MultiLoginPlugin extends Plugin {
13    @Inject
14    private Client client;
15
16    @Subscribe
17    public void onGameTick(GameTick event) {
18        // Check if multiple clients are running
19        // This is a simplified example
20        String playerName = client.getLocalPlayer() != null ? 
21            client.getLocalPlayer().getName() : "Unknown";
22        System.out.println("Logged in as: " + playerName);
23    }
24}

Code Annotations

Line 18

Get current player name

API Classes Used

Key Concepts

  • Get current player name

Next Steps

  • Learn about client instances
  • Add account list tracking
  • Add account switching helpers