-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Greenlight is a client-side library mod for Minecraft. It gives servers one shared way to allow gameplay-affecting client features, and gives client mods one shared API for checking that permission.
The usual flow:
- A client mod has a feature that should stay off unless a server allows it.
- The server ships a small JSON policy in its server resource pack.
- The client mod asks Greenlight whether that feature is granted.
- If there is no trusted policy, the mod behaves like vanilla.
Greenlight is not anti-cheat. A modified client can ignore client-side rules. The goal is to help honest clients, modpacks, and servers use one shared opt-in format.
Installing Greenlight does not turn features on by itself. It only lets compatible mods check what the current server has allowed.
If a server does not publish a Greenlight policy for a feature, compatible mods should treat that feature as denied on multiplayer.
Start here:
For the full policy file format:
Start here:
Public API package:
me.flashyreese.mods.greenlight.featureMinimal feature registration:
public static final ClientFeature<CaveTintPolicy> CAVE_TINT = Greenlight
.feature(Identifier.fromNamespaceAndPath("examplemod", "cave_tint"))
.decoder(1, CaveTintPolicy::fromJson)
.register();Query when the feature would apply:
Optional<CaveTintPolicy> policy = CAVE_TINT.policy();
if (policy.isEmpty()) {
return;
}LGPL-3.0-or-later.