Home›Java›Mods›LibertyOffline
LibertyOffline
ModsJava

LibertyOffline

Java mod listed for Minecraft 1.18–26.x. Downloads from the MC Java Mods app on Android.

by itsAlisaa · on Modrinth

⬇ Download on Modrinth

LibertyOffline is an addon for LibertyBans that allows admins to issue warnings to players even when the player has logged off.

It does this by simply displaying all active warnings for a player every time they join the game, until they expire.

This plugin was born because I assumed LibertBans warnings were shown to warned players on join every time for the duration of the warning, so I warned players while they were offline, however they never saw the warning.

There is no configuration, no commands, just one feature I thought was default.

It's so simple that I won't bother creating a GitHub repo, other than all the boiler plate, the code is just:

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        UUID uuid = player.getUniqueId();
        InetAddress ip = player.getAddress().getAddress();
        // get all active warnings for player and IP
        libertyBans.getSelector()
                .selectionByApplicabilityBuilder(uuid, ip)
                .build()
                .getAllSpecificPunishments()
                .thenAccept(punishments -> {
                    // "enforce" it which just displays warnings in chat
                    for (Punishment punishment : punishments) {
                        punishment.enforcePunishment();
                    }
                });
    }
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more