AlwaysAuth

> I have opened a support discord, join now! [https://discord.gg/uHm8EbfCFr](https://discord.gg/uHm8EbfCFr)
# AlwaysAuth

**AlwaysAuth** is a fallback authentication solution for Minecraft servers that ensures your players can log in even if Mojang’s authentication servers experience downtime. Unlike traditional offline-mode workarounds, AlwaysAuth keeps your server in **online mode** while providing a seamless failover mechanism to a local authentication system.

### How It Works

AlwaysAuth operates by inserting a **local authentication server** between your Minecraft server and Mojang’s official authentication servers:

1. When a player tries to log in, AlwaysAuth first sends the authentication request to Mojang.
2. If Mojang is online and responds, the request passes back to your server normally.
3. If Mojang is offline, AlwaysAuth uses its local fallback system to verify the user.

This approach ensures:

* **Instant failover:** No waiting for periodic checks. Even short outages are handled seamlessly.
* **Online mode stays enabled:** You never have to switch your server to offline mode.
* **Reliable authentication during extended downtime:** Long outages are handled just as smoothly.

### AlwaysAuth vs AlwaysOnline

| Feature | AlwaysAuth | AlwaysOnline |
| ————————- |————| ———— |
| Spigot Support | ✅ | ✅ |
| Paper Support | ✅ | ✅ |
| BungeeCord Support | ❌* | ✅ |
| Velocity Support | ✅ | ✅ |
| Sponge Support | ❌** | ✅ |
| Fabric Support | ✅ | ❌ |
| NeoForge Support | ✅ | ❌ |
| Instant Failover | ✅ | ❌ |
| Online Mode Stays Enabled | ✅ | ❌ |
| Remote Database Support | ✅ | ✅ |
| Records Metrics | ❌ | ✅ |
| Multiple Security Modes | ✅ | ❌ |
| IP-Based Validation | ✅ | ✅ |

*There is no possible way to set a custom session server on bungeecord, nor ever will according to md_5, see
[here](https://github.com/SpigotMC/BungeeCord/pull/3201). I will be creating a work around that involves many extra steps, however I recommend switching to Velocity or using the Standalone jar

**Sponge support is planned to be added later, I am just unfamiliar with the SpongeAPI

### Key Benefits

* **Keep Online Mode Active:** No need to compromise security for downtime.
* **Supports Multiple Platforms:** Works with Spigot, Paper, BungeeCord, Velocity, Fabric, and NeoForge.
* **Flexible Authentication:** Choose from multiple security modes and fallback methods.
* **Reliable:** Handles both short blips and extended Mojang outages effortlessly.

### Installation

1. Download the AlwaysAuth plugin for your server platform.
2. Place the plugin in your server’s `plugins` (or equivalent) folder.
3. Restart your server.
4. Configure AlwaysAuth in the config file to enable features like local authentication, remote database support, or IP-based validation.

> Give yourself the permission alwaysauth.admin to access the commands

### Configuration

AlwaysAuth provides a flexible configuration file where you can:

* Enable or disable specific fallback methods.
* Set up remote databases for cross-server authentication.
* Choose between different security modes.

“`properties
###################################
# #
# Always Auth Configuration #
# #
###################################

# Whether or not there should be debug message
# This won’t work on the standalone jar
debug=false
# Check for updates and notify staff (and console) on join who have the permission alwaysauth.admin
check-updates=true
# The ip for the session server
# If set anything other than 127.0.0.1 or 0.0.0.0 (allows public access), it will treat as external server
# An external server means only port needs to be set (to match that external server) and it will use that to authenticate.
# Please note as of right now you will not see console logs on the server if you are using an external server
ip-address=127.0.0.1
# Port for the session server
port=8765

###########################
# Security Settings #
###########################

# Enable HMAC-SHA256 signature verification for authorized servers
# Currently DISABLED by default due to Minecraft URL handling limitations
# Use firewall rules or localhost restriction for access control instead
# Database encryption works regardless of this setting
authentication-enabled=true
# Secret key for database encryption (auto-generated)
# KEEP THIS SECRET! Used to encrypt IP addresses and profile data in database
# If deleted database will need to also be reset!
# To regenerate, delete this line and restart the server
secret-key=GENERATED ON STARTUP

###########################
# Fallback Settings #
###########################

# Enable session fallback when Mojang servers are down
fallback-enabled=true
# Maximum hours a player can stay offline before requiring re-authentication (0 = always require)
max-offline-hours=72
# Days before old session data is cleaned up
cleanup-days=30
# Security level: ‘basic’ (always verify) or ‘medium’ (use max-offline-hours)
security-level=basic
# Upstream Session Server URL
# Default is Mojang’s official one but this option is here to work with things like minehut’s external servers
upstream-server=https://sessionserver.mojang.com

###########################
# Database Settings #
###########################

# Database type: h2, mysql, or mariadb
database.type=h2
# Database host (not used for H2)
database.host=localhost
# Database port (not used for H2)
database.port=3306
# Database name
database.name=minecraft
# Database username (not used for H2)
database.username=root
# Database password (not used for H2)
database.password=

“`

Agenta

# Agenta

A authserver and skin fix for legacy versions of minecraft.

# Compatibility

Requires Java 7. (In theory this can be built for Java 5, but I lack the build tools required for that.)
If running this on Java 12 and newer, please add the following JVM argument: `–add-exports java.base/sun.net.www.protocol.http=ALL-UNNAMED`

1. As a mod: The same Jar will run on forge, bukkit and Risugami’s modloader for Minecaft versions Alpha 1.0.4 to Minecraft release 1.7.10 (These are merely the versions I tested)
2. As a JavaAgent: Add the following JVM argument: `-javaagent:{path}/agent.jar` (replace path with the location of the agent.jar)
3. Inline/static: In this setup, Agenta is essentially taking over the role of Launching minecraft. Add the following JVM argument and change out `{mainClass}` as needed depending on which minecraft version you are launching: `-Dagenta.main.class={mainClass}`
4. As a Bukkit plugin (Tested with bukkit for Minecraft Beta 1.2_01)

# JVM/Congig settings

Non of these are needed to launch Agenta. The available contexts are
“*” => ALL
“static” => When Agenta is launched as the main class with the expectation of chainloading another class manually.
“config” => Only appears in the config file.

Context property Argument description
* agenta.assets.fml -Dagenta.assets.fml={value} A link to an archive Agenta should forward legacy forge download requests to
* agenta.assets.index -Dagenta.assets.index={value} The URL for the asset index Agenta should use as a base
* agenta.assets.routing -Dagenta.assets.routing=true Should agenta reroute requests the mojang’s asset servers? (default: “true”)
* agenta.assets.url -Dagenta.assets.url={value} The URL for the resource server Agenta should pull assets from
* agenta.prt.color -Dagenta.prt.color=false Pass the value ‘false’ to disable colour printing.
* agenta.prt.debug -Dagenta.prt.debug=false Should agenta show debug messages?
* agenta.save.file -Dagenta.save.file=saves.json When handling saving for certain versions of old Minecraft that relied on long dead mojang endpoints, what should agenta call the save file? (default: “saves.json”)
* agenta.skin.resize -Dagenta.skin.resize=true Should agenta try to resize skins from 64×64 to 64×32 for better compatibility? (default: “true”)
* agenta.skin.merge -Dagenta.skin.merge=true Should Agenta take multi layered skins and attempt to flatten the layers down? (default: “true”)
* agenta.skin.cache -Dagenta.skin.cache=true Should agenta cache skin lookups? (default: “true”)
config agenta.config.version The version of agenta that generated a set config file. Will be used to detect if agenta should upgrade a set config file
static agenta.main.class -Dagenta.main.class={value} The class Agenta should try to load next when running in static/inline mode

# Fixes

– Skin support for pre 1.7.10 versions
– Cape support for pre 1.7.10 versions
– Sound for versions of the game that predate 1.6
– World savings for certain pre-alpha builds (experimental)
– Forge 1.5.2 being unable to fetch it’s library files (experimental)

# Note

– The same jar will work for almost every version of minecraft that predates Release 1.8
– Any miscellaneous fabric based modloader _should_ be supported.
– NilLoader can load Agenta. (Agenta doesn’t meet the criteria of a [NilLoader mod](https://git.sleeping.town/Nil/NilLoader#:~:text=A%20NilLoader%20mod%20includes%20a%20complete%20copy%20of%20NilLoader%20within%20itself))
– Some ancient versions of Forge/modloader may require you to load Agenta as a jar mod.
– LiteLoader inforces compatibility checks and so can never be fully supported

Adventures Updates’s Bow (StationAPI)

![Screenshot of bow charging](https://cdn.modrinth.com/data/cached_images/a8844311525b7bda436c9e3396f8d6095e745c66_0.webp)
A port of modern bow charging functionality from adventure update (b1.8 to 1.0) replacing the simple right click firing system

# Depedencies

– [Babric](https://babric.github.io/)
– [StationAPI](https://modrinth.com/mod/stationapi)
– [FarnUtil](https://modrinth.com/mod/farnutil)

# Supported Mod
– [Elemental Arrow](https://modrinth.com/mod/elemental-arrows-stationapi)
– [Aether (Specifically Phoenix’s Bow)](https://modrinth.com/mod/aether)
– [BHCreative (Unlimited shooting in creative without need for arrow in inventory)](https://modrinth.com/mod/bh-creative)