LibertyOffline 图标

LibertyOffline

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/libertyoffline
资源信息

Minecraft 版本: 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2

平台: bukkit folia paper purpur spigot

标签: management utility

资源介绍

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();
                    }
                });
    }
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Suspicious Lakes

价格:0 墨喵币
下载量:0

查看详情
Simply Lovely

价格:0 墨喵币
下载量:0

查看详情
Dynamic CORE+

价格:0 墨喵币
下载量:0

查看详情
Katanas

价格:0 墨喵币
下载量:0

查看详情