AltFinder 2.4.18

Track and find potential alt accounts with ease

  1. egg82
    Native Minecraft Version:
    1.13
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    Source Code:
    https://github.com/egg82/AltFinder
    altfinder-banner-compressor.jpg
    Looking for the Bungee version? Find it here!

    playeripapi-installation-tab.png
    Single / Personal servers
    Simply drop the jar into your "plugins" folder. The auto-generated config should default to reasonable values for you, but you may modify it if you wish.

    Multiple servers / Large networks
    Drop the jar into the plugins folder and configure the "sql" section to use MySQL instead of SQLite. RabbitMQ and/or Redis are optional but highly recommended if you have multiple servers.

    PLEASE NOTE: If you have multiple servers, either use a shared MySQL database or set up Redis or RabbitMQ. Data desync issues will occur if this does not happen.

    playeripapi-config-tab.png
    Code (Text):
    # How the plugin stores long-term data
    storage:
      # The storage method
      #
      # Options:
      # - MySQL (remote)
      # - SQLite (local)
      method: 'sqlite'

      data:
        # Address and port of the remote database (if applicable)
        address: '127.0.0.1:3306'
        # The name of the database AltFinder will store data in
        # If you're using remote options, this must be created beforehand
        database: 'altfinder'
        # Table prefix for all AltFinder tables
        prefix: 'altfinder_'
        # Database credentials (if applicable)
        username: ''
        password: ''
        # Whether or not to use SSL
        ssl: false

        # MongoDB options- obviously don't need to worry about these if not using MongoDB ;)
        mongodb:
          # Connection prefix for all AltFinder connections
          collection-prefix: ''
          # MongoDB ClientConnectionURI
          connection-uri: ''

      settings:
        # The maximum size of the database connection pool
        # Determines the max number of connections to the database
        max-pool-size: 2
        # The minimum size of the satabase connection pool
        # Determines the min number of connections kept alive to the database
        min-idle: 2
        # The maximum lifetime of a connection in the pool
        # Should be at least 30 seconds less than any database or infrastructure-imposed connection time limit
        max-lifetime: 1800000 # 30 minutes
        # The maximum number of milliseconds that the plugin will wait for a new connection from the pool before timing out
        timeout: 5000 # 5 seconds

        # Extra connection properties
        properties:
          unicode: true
          encoding: 'utf8'

    # Redis is a very fast cache accessible by multiple servers
    # If you don't want to constantly hit your database for queries, try enabling and configuring this
    # You will need to install the (external) Redis server software if you haven't already
    # https://redis.io/
    redis:
      enabled: false
      # Address and port of the remote Redis server
      address: '127.0.0.1:6379'
      # Redis credentials
      password: ''

    # RabbitMQ is a messaging queue that will allow the plugin to push instant updates across multiple servers
    # You will need to install the (external) RabbitMQ server software if you haven't already
    # https://www.rabbitmq.com/
    rabbitmq:
      enabled: false
      # Address and port of the remote RabbitMQ server
      address: '127.0.0.1:5672'
      # RabbitMQ credentials
      username: 'guest'
      password: 'guest'

    # When true, logs some extra output to the console so you can see if/why things might be failing
    debug: false

    # A list of player UUIDs and/or IPs to ignore
    ignore:
    - '127.0.0.1'
    - 'localhost'
    - '::1'
    #- '069a79f4-44e9-4726-a5be-fca90e38aaf5' #Notch

    stats:
      # Whether or not to send anonymous usage statistics to bStats
      # True: Send anonymous stats; let the author know how well the plugin is doing and how it's used!
      # False: Do not send stats and make the author sad :(
      usage: true
      # Whether or not to send anonymous errors to the author
      # True: Send errors anonymously to Rollbar and/or GameAnalytics so the author can fix them!
      # False: Do not send errors and wonder why any bugs you encounter haven't beeen fixed
      errors: true

    update:
      # Whether or not to automatically check for updates and notify the console if found
      check: true
      # Whether or not to notify players with the altfinder.admin permission node
      notify: true

    # Config version, no touchy plz
    version: 3.0
    playeripapi-commands-tab.png
    /seen <ip|name> - Shows the last logout time of a player.
    /altfinder reload - Reloads the plugin.
    /altfinder search|find - Finds potential alt accounts on the IP or player specified.
    /altfinder delete|del|gdpr - Removes a given IP or player from the system.

    playeripapi-permissions-tab.png
    altfinder.admin - gives access to reload and delete commands, and notifies of updates
    altfinder.seen - perm node for /seen
    altfinder.search - perm nodes for the search command

    playeripapi-donations-tab.png
    Please consider donating to support this free plugin!
    PP_logo_h_150x38.png

    playeripapi-legal-tab.png
    According to the GDPR, you must specify that you are storing IP information to your players in a privacy policy when using this plugin (actually you need that if you're running a vanilla server without this plugin because of server logs). You may also be required to remove some data using the provided commands.
    Disclaimer: I am a plugin developer, not a lawyer. This information is provided as a "best guess" and is not legal advice.

    playeripapi-api-tab.png
    Maven
    Code (Text):
    <repository>
      <id>egg82-ninja</id>
      <url>https://www.myget.org/F/egg82-java/maven/</url>
    </repository>
    Latest Repo
    https://www.myget.org/feed/egg82-java/package/maven/me.egg82/altfinder-common

    API usage
    Code (Text):
    AltAPI.getInstance();
    ...
    long getCurrentSQLTime();
    void addPlayerData(UUID uuid, String ip, String server);
    void removePlayerData(UUID uuid);
    void removePlayerData(String ip);
    ImmutableSet<PlayerData> getPlayerData(UUID uuid);
    ImmutableSet<PlayerData> getPlayerData(String ip);

    ---

    ImmutableSet<PlayerData> data = api.getPlayerData("127.0.0.1");
    PlayerData d = data.get(0); // Somehow
    d.getUUID();
    d.getIP();
    d.getCount();
    d.getServer();
    d.getCreated();
    d.getUpdated();
    Example - list all players logged into all IPs that a specified player has ever logged in on
    Code (Text):
    ImmutableSet<PlayerData> uuidData = api.getPlayerData(uuid);
    Set<PlayerData> altData = new HashSet<>(uuidData);

    for (PlayerData data : uuidData) {
        altData.addAll(api.getPlayerData(data.getIP()));
    }

    altData.removeIf(v -> uuid.equals(v.getUUID())); // This now contains all potential alts, minus the original uuid that was searched for
    Example - emulate Essentials /seen
    Code (Text):
    ImmutableSet<PlayerData> data = api.getPlayerData(ip);
    for (PlayerData d : data) {
        getName(d.getUUID());
    }

    List<PlayerData> sorted = new ArrayList<>(data);
    sorted.sort(Comparator.comparingLong(PlayerData::getCreated));

    if (data.isEmpty()) {
        sender.sendMessage("No players have logged in from " + ip);
    } else {
        for (PlayerData data : sorted) {
            String name = getName(data.getUUID());
            sender.sendMessage("Player: " + (name != null ? ChatColor.GREEN + name : ChatColor.RED + "UNKNOWN"));
            sender.sendMessage(" - First seen: " + getTime(data.getCreated(), api.getCurrentSQLTime()) + " ago");
            sender.sendMessage(" - Last seen: " + getTime(data.getUpdated(), api.getCurrentSQLTime()) + " ago on " + data.getServer());
            sender.sendMessage(" - IP Login Count: " + data.getCount());
        }
    }
    YouTube0099 and MindoTv like this.

Recent Reviews

  1. fcmadzer
    fcmadzer
    5/5,
    Version: 2.4.14
    Really good plugin and support is amazing. Egg knows what he is doing, highly recommend any of his plugins
    1. egg82
      Author's Response
      Thank you for the review!
  2. Antrox
    Antrox
    5/5,
    Version: 2.4.13
    Very good, got no complaints. It just works

    ____________________________________
    1. egg82
      Author's Response
      Thank you for the review!
  3. PyraFox
    PyraFox
    4/5,
    Version: 2.4.13
    Pretty good plugin - can't find a place to report bugs, but it causes a hangup on my server when I shutdown, the server lags for around 15 seconds longer than usual. Using PaperSpigot 1.13.2
    1. egg82
      Author's Response
      Ah, I figured that was just an issue I was having with my other dev plugins. I'll take a look, thank you! Also- try the "Discuss This Resource" button on the right for bug reports ;)