From f5b61aeb2381596ffb00350a819749ee221397bd Mon Sep 17 00:00:00 2001 From: Oznobys Date: Mon, 21 Jul 2025 23:02:41 +0300 Subject: [PATCH 1/3] feature-27-LibertyBans --- .dockerignore | 3 + .gitignore | 4 +- src/plugins/LibertyBans/config.yml | 281 +++++++++++ src/plugins/LibertyBans/import.yml | 187 +++++++ src/plugins/LibertyBans/lang/messages_en.yml | 498 +++++++++++++++++++ src/plugins/LibertyBans/lang/messages_ru.yml | 438 ++++++++++++++++ src/plugins/LibertyBans/scope.yml | 48 ++ src/plugins/LibertyBans/sql.yml | 119 +++++ src/plugins/LibertyBans_Release-1.1.0.jar | 3 + 9 files changed, 1580 insertions(+), 1 deletion(-) create mode 100644 src/plugins/LibertyBans/config.yml create mode 100644 src/plugins/LibertyBans/import.yml create mode 100644 src/plugins/LibertyBans/lang/messages_en.yml create mode 100644 src/plugins/LibertyBans/lang/messages_ru.yml create mode 100644 src/plugins/LibertyBans/scope.yml create mode 100644 src/plugins/LibertyBans/sql.yml create mode 100644 src/plugins/LibertyBans_Release-1.1.0.jar diff --git a/.dockerignore b/.dockerignore index cabe65a..c1689e1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -27,3 +27,6 @@ src/plugins/DiscordSRV/accounts.aof .crowdin src/plugins/PlasmoVoice/voice_mutes.json + + +src/plugins/LibertyBans/internal diff --git a/.gitignore b/.gitignore index b18686a..df97e77 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,8 @@ src/map-color-cache.dat src/plugins/DiscordSRV/accounts.aof - .crowdin src/plugins/PlasmoVoice/voice_mutes.json + + +src/plugins/LibertyBans/internal diff --git a/src/plugins/LibertyBans/config.yml b/src/plugins/LibertyBans/config.yml new file mode 100644 index 0000000..2d83e2c --- /dev/null +++ b/src/plugins/LibertyBans/config.yml @@ -0,0 +1,281 @@ + # + # + # The main LibertyBans configuration + # All options here can be updated with /libertybans reload + # + # +durationPermissions: + # Which duration permissions should a staff member be checked for? + # Specify all the durations which you want to explicitly grant permission for. + permissions-to-check: + - 'perm' + - '4h' + - '30d' + - '10d' + # If disabled, players are not checked for duration permissions. + enable: false + + # Formatting of absolute dates +date-formatting: + # How should dates be formatted? Follows Java's DateTimeFormatter.ofPattern + format: 'dd/MM/yyyy kk:mm' + # Do you want to override the timezone? If 'default', the system default timezone is used + # The value must be in continent/city format, such as 'America/New_York'. Uses Java's ZoneId.of + timezone: 'Europe/Kyiv' + + # What language file should be used for messages? + # For example, 'en' means LibertyBans will look for a file called 'messages_en.yml' +lang-file: 'en' + # Options related to punishment enforcement and alt account checking + # + # -- Alt Account Enforcement and Checking -- + # There are multiple ways to combat alt accounts in LibertyBans. + # + # First, you can have the plugin automatically detect alt accounts and prevent them from joining, + # with the same ban message. This is controlled by the 'address-strictness' setting. + # + # Second, you can tell your staff members to be on the lookout for alts. They can use + # the /alts command to manually check players they suspect are alt accounts. Also, you can + # use the alts-auto-show feature which will automatically notify staff of players who may be using alts. + # + # Third, you may use 'composite punishments', a more advanced feature which is described on the wiki. +enforcement: + # Controls the expiration of join history as used by manual alt detection. + # This allows expiring alt accounts after some time has elapsed. + # + # This setting does NOT affect enforcement of IP-based punishments. + # It applies only to the /alts command and the alts-auto-show feature. + # + # Note that this feature will not actually delete any data from the database. + alt-account-expiration: + # The expiration time, in days. + expiration-time-days: 30 + # Whether to enable this feature + enable: false + + # + # How strict should IP-based punishments be? + # Available options are LENIENT, NORMAL, STERN, and STRICT + # + # An IP-based punishment applies to a player if: + # LENIENT - The player's current address matches the punished address + # NORMAL - Any of the player's past addresses matches the punished address + # STERN - Any of the player's past addresses matches any of the past addresses of the punished user + # + # STRICT is the same as STERN, but also enforces user punishments as stringently as IP-based punishments. + # (Using STRICT turns all user punishments into IP-based punishments) + address-strictness: 'NORMAL' + # Limits players connecting from the same IP address. + # + # The limiter works by counting the amount of joins from a given IP address within a recent timespan. + # Thus, it is not an absolute limit, but a limit on the rate of joins. + connection-limiter: + # What is the duration within which recent joins are counted against the limit? + # The default is 30 minutes and the value is specified in seconds. + duration-seconds: 1800 + # The limit to apply + limit: 5 + # The message when a player is denied from joining due to the limit + denial-message: 'There have been too many connections from your IP address recently' + # Whether to enable this feature + enable: false + + # Runs an alt-check on newly joined players, as if by /alts, + # the results of which will be shown to staff members with the libertybans.alts.autoshow permission. + alts-auto-show: + # Allows determining which alts will be shown by this alt-check + # (This does not affect the alts command, which will always show all alts) + # ALL_ALTS - shows all alts + # BANNED_OR_MUTED_ALTS - shows alts either banned or muted + # BANNED_ALTS - shows only banned alts + show-which-alts: 'ALL_ALTS' + # Set to true to enable this feature + enable: false + + # + # A list of commands muted players will not be able to execute + # + # This list supports subcommands, which will be enforced if the executed command starts with the list entry. + # Additionally, colons in commands, such as"pluginname:cmd", cannot be used to bypass this. + mute-commands: + - 'msg' + - 'r' + - 't' + - 'w' + - 'tell' + - 'me' + - 'whisper' + - 'say' + - 'clan chat' + - 'reply' + + # Options relating to finding UUIDs from names, and vice-versa + # LibertyBans will first check its own caches before using these resources +player-uuid-resolution: + # + # As a last resort, when LibertyBans cannot find a uuid or name, it will use an external web API + # Available options are 'MOJANG', 'ASHCON', and 'MCHEADS'. They will be queried sequentially in the order specified. + # (If the server is not in ONLINE mode, this option is ignored) + web-api-resolvers: + - 'MOJANG' + # By default, LibertyBans will automatically detect if you are running Geyser or Floodgate. + # The prefix will be determined using the Geyser API + # + # However, in rare cases, you may want to force LibertyBans to acknowledge the presence of Geyser usernames + # If so, set this option to the value of the prefix you use for Geyser/Floodgate. + # An empty string will revert this option to automatic detection, which requires a server restart to take effect. + force-geyser-prefix: '' + # + # What kind of UUIDs do your players have? + # Available options are ONLINE, OFFLINE, and MIXED + # + # For most servers this will be 'ONLINE' + # For offline servers where all players have offline UUIDs, use OFFLINE + # For offline servers where some players have online and some have offline UUIDs, use MIXED + server-type: 'ONLINE' + +platforms: + # Related to game servers such as Spigot, Paper, and Sponge + game-servers: + # This option is relevant for backend servers running within a network (BungeeCord or Velocity). + # It enables the use of plugin messaging, such as for: + # - Kicking the player from the entire network + # - Detecting the name of the backend server for use with server scopes + # - Synchronizing punishments across instances, depending on the mode in the sql.yml + # + # DO NOT enable this option if you do not run a network. Otherwise, you create a security vulnerability + # whereby players can pretend to be coming from a proxy, evading kicks and sending sync messages. + # After changing this option, please perform a restart (/libertybans restart). + use-plugin-messaging: false + + # Related to the Sponge platform + sponge: + # Whether to register the ban service for use by other plugins. + # If enabled, LibertyBans will replace the server's default banning implementation with its own. + # + # This option is somewhat technical. For advice on whether you should configure this option, + # please ask for support. + # It is highly recommended to ask for guidance if you are unsure about this option. + # + # How this affects compatibility: + # - If disabled, the vanilla ban service will remain. Other plugins which query for bans will be + # served with information from vanilla. For example, if a player is banned through LibertyBans + # but not vanilla, then other plugins will think the player is not banned. + # - If enabled, uses of the ban service will forward to LibertyBans. Other plugins which query for bans + # will be served with accurate information from LibertyBans. + # - However, the LibertyBans ban service has limitations. It cannot issue bans, for example. + # So, if another plugin attempts to create bans using the ban service, you will receive an error. + # If you absolutely need other plugins to issue bans, you must disable this option. + # + # Note that it is impossible to import vanilla bans if you enable this option. So, if you wish to import + # from vanilla, first you need to disable this option. After importing, you may re-enable it. + register-ban-service: true + + # Related to proxies such as BungeeCord and Velocity + proxies: + # Set this to true to indicate that you are running multiple proxy instances. + # + # It will instruct LibertyBans to perform additional synchronization measures, where applicable. + multiple-proxy-instances: false + # Server-scoped punishments will be enforced by preventing server switches for players connecting + # to servers on which they are banned. The server name is obtained from the proxy API + # + # This option is enabled by default for full functionality. However, it increases performance usage, + # so you may want to disable it if you do not use the scopes feature. + enforce-server-switch: true + + +commands: + # If this is enabled, it will be as if relevant commands used the -both argument. + # Effectively, this makes punishments more strict, since moderators will end up banning UUIDs and addresses + use-composite-victims-by-default: false + # By default, /blame shows only active punishments made by a staff member. + # If you disable this option, /blame will show all punishments, including those revoked and expired. + # + # If you use the staffrollback addon, you probably want to disable this to make /blame consistent + # with the staffrollback operation. + blame-shows-active-only: true + # By default, /history and /warns show punishments specifically for the player requested. + # Enabling this option will make /history and /warn scan punishments which would apply to the player + # + # For example, an IP ban may apply to a player, but it will not be in the player's /history unless this is enabled + show-applicable-for-history: false + # Other options relating to tab completion + # These settings require a restart (/libertybans restart) to take effect + tab-completion: + # Regards tab completing the names of players who have formerly joined + # This can be a bit heavy on memory for large servers, so it's disabled by default. + # To tune how long player names are retained for, see the retention-minutes option + offline-player-names: + # What is the period in which recently joining players' names should be completed + # If a player has joined in the last specified amount of minutes, his or her name is tab-completed + retention-minutes: 4320 + # This feature is implemented using a cache. How often should the cache be refreshed? + # Shorter times mean more accurate tab completion but use slightly more performance + cache-refresh-seconds: 120 + # Whether to enable this feature + enable: false + + # This option is only relevant when LibertyBans is on a proxy + # If enabled, tab completion of online player names will exclude the names of players + # on different backend servers. + use-only-players-on-same-server: true + # Enables tab-completing punishment durations. For example, '30d' in '/ban A248 30d' + # + punishment-durations: + # Which duration permissions should be tab-completed? + # Specify all the durations which you want to tab complete. + # + # If duration permissions are enabled, only players who have permission to use a certain duration + # will have that duration tab-completed. + durations-to-supply: + - 'perm' + - '4h' + - '30d' + - '10d' + # Whether to enable this feature + enable: false + + + # Whether to enable tab completion + enable-tab-completion: true + # What commands should be registered as aliases for libertybans commands? + # For each command listed here, '/' will be equal to '/libertybans ' + # + # This basic system is for convenience; please use a dedicated alias plugin if you need more control. + # Also, please note that command aliases are disabled on Sponge, due to command API differences. + aliases: + - 'ban' + - 'ipban' + - 'mute' + - 'ipmute' + - 'warn' + - 'ipwarn' + - 'kick' + - 'ipkick' + - 'unban' + - 'unbanip' + - 'unmute' + - 'unmuteip' + - 'unwarn' + - 'unwarnip' + - 'banlist' + - 'mutelist' + - 'history' + - 'warns' + - 'blame' + - 'alts' + - 'accounthistory' + + # Handles how staff are permitted to specify reasons +reasons: + # Deprecated option kept for compatibility purposes. Ignore this. + permit-blank: false + # When entering commands, what happens if the staff member does not specify a reason? + # USE_EMPTY_REASON - Keep the reason blank, as specified. + # REQUIRE_REASON - Deny the command; send the usage message. + # SUBSTITUTE_DEFAULT - Substitute the default reason. + unspecified-reason-behavior: 'SUBSTITUTE_DEFAULT' + # If unspecified-reason-behavior is SUBSTITUTE_DEFAULT, what is the default reason to use when staff do not specify a reason? + default-reason: 'No reason stated.' + diff --git a/src/plugins/LibertyBans/import.yml b/src/plugins/LibertyBans/import.yml new file mode 100644 index 0000000..5799544 --- /dev/null +++ b/src/plugins/LibertyBans/import.yml @@ -0,0 +1,187 @@ + # Settings for importing from other plugins + # Most users should not have to touch this. + # + # In order to perform an import, run /libertybans import . + # Available sources are 'advancedban', 'litebans', 'vanilla', and 'self'. + # + # Importing from vanilla is only possible on Bukkit. + # Essentials users: Note that Essentials uses the vanilla ban system. + # + # During the import, it is not needed to enable the plugin you are importing from. + # + # --- NOTICE --- + # You MUST backup your data before performing the import. + # LibertyBans will never delete your data, but taking a backup is the best practice + # whenever you are performing any large transfer of data. + # + # --- WARNING when importing from AdvancedBan and Vanilla --- + # AdvancedBan/Vanilla does not store the uuid of the operator who made a punishment. + # To work around this, LibertyBans will attempt to lookup the operator uuid. By default + # this uses the Mojang API. However, if your server sends the Mojang API too many requests, + # your server might be rate limited (which you do NOT want to happen). + # To prevent this, add another service to your web-api-resolvers, in the config.yml + # before importing. + # + # + # + # + # -- Importing from AdvancedBan -- + # + # The defaults here match the default settings in AdvancedBan. + # If you use AdvancedBan's default storage, you do not need to change anything here. + # + # --- Using AdvancedBan's MySQL/MariaDB Storage --- + # However, if you use MySQL with AdvancedBan, you will need to change a few things. + # The jdbc-url should be set to 'jdbc:mariadb://:/' with , + # , and replaced with the correct values. The username and password + # ought to be the same username and password you used with AdvancedBan. + # + # For example: You used AdvancedBan with MySQL. Your host is localhost, your port + # is 3306, and your database name is 'bans'. You use the username 'advancedban' and + # password 'password'. You should set the jdbc-url option to + # 'jdbc:mysql://localhost:3306/bans', the username to 'advancedban', and the password to 'password' +advancedban: + jdbc-url: 'jdbc:hsqldb:file:plugins/AdvancedBan/data/storage;hsqldb.lock_file=false' + password: '' + username: 'SA' + + # + # + # + # -- Importing from LiteBans -- + # + # This is no easy task. The main problem is that LiteBans is a closed-source black box, + # such that no one except its author knows how the plugin works internally. + # + # However, it is still possible to import from LiteBans to LibertyBans, and this is achieved + # primarily from inspecting the generated SQL schema. + # + # --- Config Options Explained --- + # The jdbc-url depends on the storage mode you are using LiteBans with. + # - Using H2, it should be 'jdbc:h2:./plugins/LiteBans/litebans' + # - Using MySQL or MariaDB, it should be 'jdbc:mariadb://:/' with , + # , and replaced with the correct values. + # - Using PostgreSQL, it should be 'jdbc:postgresql://:/' with , + # , and replaced with the correct values. + # + # If you configured a username and password for LiteBans, you should enter the same + # username and password in this section. + # + # --- JDBC Driver Availability: If you use H2 --- + # LiteBans uses the H2 database by default. If importing from H2, you will need to install the H2 driver first. + # + # The driver is installed by adding it to the classpath. This is done by downloading the driver jar, and starting + # your server with the -cp option. The wiki has a tutorial on how to do this. +litebans: + # The same table prefix you used with LiteBans + table-prefix: 'litebans_' + # The default value here is set for H2. + jdbc-url: 'jdbc:h2:./plugins/LiteBans/litebans' + password: '' + username: '' + + # + # + # + # -- Importing from BanManager (v7) -- + # + # Bans, IP bans, mutes, IP mutes, warns, and kicks are supported. + # + # BanManager's IP range bans, name bans, notes, and reports are not supported. LibertyBans has no equivalent features. + # + # --- Config Options Explained --- + # The jdbc-url depends on the storage mode you are using BanManager with. + # - Using H2, it should be 'jdbc:h2:./plugins/BanManager/local-bans' + # - Using MySQL or MariaDB, it should be 'jdbc:mariadb://:/' with , + # , and replaced with the correct values. + # + # If you configured a username and password for BanManager, you should enter the same + # username and password in this section. +ban-manager: + # The same table prefix you used with BanManager + table-prefix: 'bm_' + # The default value here is set for H2. + jdbc-url: 'jdbc:h2:./plugins/BanManager/local-bans' + password: '' + username: '' + + # How many punishments to retrieve at once from the import source. + # You may be surprised to find out your server is capable of retrieving hundreds, + # even thousands of punishments, into memory without much trouble. However, + # this is set to 250 as a reasonable conservative estimate. +retrieval-size: 250 + # + # + # + # -- Importing from another LibertyBans database -- + # + # NOTICE: The current database MUST be empty when the import is performed. + # + # The self-import process is different from the import process for other plugins. + # It is a direct transfer, which is why the current database must be empty. Also, punishment IDs are preserved. + # + # Self-importing may be used to switch between various database backends supported by LibertyBans. + # For example, you could transfer your data from HSQLDB to MariaDB. + # + # The settings here are used exactly as in sql.yml - in fact, they are the same settings. +self: + # Whether to reverse the direction of the self-import. If enabled, this will import TO the database + # configured here, rather than FROM it. + # + # Normally, LibertyBans will import from this database, to the current database defined in sql.yml. + # If this option is enabled, LibertyBans will import to the current database in sql.yml, from this database. + reverse-direction: false + # + # Connection timeout settings + # LibertyBans uses HikariCP for connection pooling. The following settings control connection timeouts. + timeouts: + # How long, at maximum, should LibertyBans wait when acquiring new connections, if no existing connection is available? + connection-timeout-seconds: 14 + # How long, at maxium, should a connection in the pool last before having to be recreated? + # "This value should be set for MariaDB or MySQL. HikariCP notes: + # "It should be several seconds shorter than any database or infrastructure imposed connection time limit" + max-lifetime-minutes: 25 + + # Authentication details for remote databases: used for MariaDB, MySQL, PostgreSQL, and CockroachDB. + auth-details: + database: 'bans' + password: 'defaultpass' + user: 'defaultuser' + host: 'localhost' + port: 3306 + + # The values in this section only apply when using a MariaDB or MySQL database + mariadb: + # Connection properties to be applied to database connections + connection-properties: + cachePrepStmts: 'true' + useUnicode: 'true' + prepStmtCacheSqlLimit: '1024' + characterEncoding: 'UTF-8' + prepStmtCacheSize: '25' + useServerPrepStmts: 'true' + + + # The values in this section only apply when using a PostgreSQL or CockroachDB database + postgres: + # Connection properties to be applied to database connections + connection-properties: + preparedStatementCacheQueries: '25' + + + # Legacy option. Don't touch this unless you understand it or you're told to enable it. + use-traditional-jdbc-url: false + # What RDMS vendor will you be using? + # Available options: + # 'HSQLDB' - Local HyperSQL database. No additional requirements. + # 'MARIADB' - Requires an external MariaDB database. At least MariaDB 10.6 is required. + # 'MYSQL' - Requires an external MySQL database. At least MySQL 8.0 is required. + # 'POSTGRES' - Requires an external PostgreSQL database. At least PostgreSQL 12 is required. + # 'COCKROACH' - Requires an external CockroachDB database. The latest CockroachDB is required. Warning: this option is strictly experimental. + rdms-vendor: 'HSQLDB' + # + # How large should the connection pool be? + # A thread pool of similar size is derived from the connection pool size. + # For most servers, the default option is suitable. + connection-pool-size: 6 + diff --git a/src/plugins/LibertyBans/lang/messages_en.yml b/src/plugins/LibertyBans/lang/messages_en.yml new file mode 100644 index 0000000..89ff113 --- /dev/null +++ b/src/plugins/LibertyBans/lang/messages_en.yml @@ -0,0 +1,498 @@ + # + # Messages configuration + # + # + # In most cases, the variables inside the default messages are those available + # in that specific message. The exception to this is messages which are related + # to a certain punishment. + # + # When message has an associated punishment, multiple variables are available: + # + # %ID% - punishment ID number + # %TYPE% - punishment type, e.g. 'Ban' + # %TYPE_VERB% - punishment type as a verb, e.g. 'Banned' + # %VICTIM% - display name of the victim of the punishment + # %VICTIM_ID% - internal identifier of victim + # %OPERATOR% - display name of the staff member who made the punishment + # %OPERATOR_ID% - internal identifier of the operator + # %UNOPERATOR% - staff member undoing the punishment. available only when the punishment is undone + # %UNOPERATOR_ID% - internal identifier of staff member undoing the punishment + # %REASON% - reason for the punishment + # %SCOPE% - scope of the punishment + # %DURATION% - original duration (how long the punishment was made for) + # %START_DATE% - the date the punishment was created + # %TIME_PASSED% - the time since the punishment was created + # %TIME_PASSED_SIMPLE% - the time since the punishment was created, rounded to the biggest time unit possible (e.g. 2 months instead of 1 month 23 days) + # %END_DATE% - the date the punishment will end, or formatting.permanent-display.absolute for permanent punishments + # %TIME_REMAINING% - the time until the punishment ends, or formatting.permanent-display.relative for permanent punishments + # %TIME_REMAINING_SIMPLE% - the time until the punishment ends, rounded to the biggest time unit possible (e.g. 10 days instead of 9 days 13 hours) + # %HAS_EXPIRED% - Shows if a punishments duration has run out. Does not check if the punishment is revoked! + # %TRACK% - the escalation track of the punishment, for example if you are using layouts + # %TRACK_ID% - the ID of the escalation track + # %TRACK_NAMESPACE% - the namespace of a track can be used by other plugins to implement their own layouts + # + # The following variables have limited availability: + # %TARGET% - the original target argument of a command. For example, in '/ipban Player1', %TARGET% is Player1 + # %NEXTPAGE% - the number of the next page of a list like history + # %PREVIOUSPAGE% - the number of the previous page of a list like history + # + # + # Configuration for the /accounthistory command +account-history: + # Regards /accounthistory list + listing: + none-found: '&7No recorded accounts found' + usage: '&cUsage: /accounthistory list ' + # How a single recorded account should be displayed + # Available variables: + # %TARGET% - the original input to the command + # %USERNAME% - the username the player connected with + # %ADDRESS% - the address the player connected with + # %DATE_RECORDED% - the date the join was recorded + # %DATE_RECORDED_RAW% - the raw timestamp the join was recorded + layout: '%USERNAME% &7(on %ADDRESS%) at %DATE_RECORDED% (%DATE_RECORDED_RAW%)||ttp:&7Click to delete this stored account||cmd:/accounthistory delete %TARGET% %DATE_RECORDED_RAW%' + # The message to display before the account listing. Set to an empty string to disable + header: '&7Known accounts report for &c&o%TARGET%&7 follows.' + permission: '&cYou may not list recorded accounts.' + + usage: '&cUsage: /accounthistory ' + # Pertains to /accounthistory delete + delete: + no-such-account: '&c%TARGET% has no recorded account for the specified timestamp.' + usage: + - '&cUsage: /accounthistory delete .&f' + - '&7The timestamp is in unix seconds and is usually obtained from /accounthistory list' + permission: '&cYou may not delete recorded accounts.' + success: '&7Successfully deleted the recorded account of &e%TARGET%' + + + # + # Messages regarding /ban, /mute, /warn, /kick + # Includes punishment layouts + # + # +additions: + mutes: + success: + message: '&aMuted &c&o%VICTIM%&a for &o%DURATION%&r&a because of &e&o%REASON%&a.' + notification: '&c&o%OPERATOR%&7 muted &c&o%VICTIM%&7 for &a&o%DURATION%&7 because of &e&o%REASON%&7.' + + exempted: '&c&o%TARGET%&7 cannot be muted.' + conflicting: '&c&o%TARGET%&7 is already muted.' + usage: '&cUsage: /mute &e [time] &c.' + layout: + - '&7&lMuted&f' + - '&cDuration: &e%TIME_REMAINING%&f' + - '' + - '&c&lReason&f' + - '&7%REASON%' + permission: + duration: '&cYou may not do this for &e%DURATION%&c.' + both: '&cYou may not do this to players and their IP addresses.' + uuid: '&cYou may not do this to players.' + ip-address: '&cYou may not do this to IP addresses.' + + + kicks: + success: + message: '&aKicked &c&o%VICTIM%&a because of &e&o%REASON%&a.' + notification: '&c&o%OPERATOR%&7 kicked &c&o%VICTIM%&7 because of &e&o%REASON%&7.' + + must-be-online: '&c&o%TARGET%&7 must be online.' + exempted: '&c&o%TARGET%&7 cannot be kicked.' + usage: '&cUsage: /kick &e &c.' + layout: + - '&7&lKicked&f' + - '' + - '&c&lReason&f' + - '&7%REASON%' + permission: + both: '&cYou may not do this to players and their IP addresses.' + uuid: '&cYou may not do this to players.' + ip-address: '&cYou may not do this to IP addresses.' + + + warns: + success: + message: '&aWarned &c&o%VICTIM%&a for &o%DURATION%&r&a because of &e&o%REASON%&a.' + notification: '&c&o%OPERATOR%&7 warned &c&o%VICTIM%&7 for &a&o%DURATION%&7 because of &e&o%REASON%&7.' + + exempted: '&c&o%TARGET%&7 cannot be warned.' + usage: '&cUsage: /warn &e [time] &c.' + layout: + - '&7&lWarned&f' + - '&cDuration: &e%TIME_REMAINING%&f' + - '' + - '&c&lReason&f' + - '&7%REASON%' + permission: + duration: '&cYou may not do this for &e%DURATION%&c.' + both: '&cYou may not do this to players and their IP addresses.' + uuid: '&cYou may not do this to players.' + ip-address: '&cYou may not do this to IP addresses.' + + + bans: + success: + message: '&aBanned &c&o%VICTIM%&a for &o%DURATION%&r&a because of &e&o%REASON%&a.' + notification: '&c&o%OPERATOR%&7 banned &c&o%VICTIM%&7 for &a&o%DURATION%&7 because of &e&o%REASON%&7.' + + exempted: '&c&o%TARGET%&7 cannot be banned.' + conflicting: '&c&o%TARGET%&7 is already banned.' + usage: '&cUsage: /ban &e [time] &c.' + layout: + - '&7&lBanned&f' + - '&cDuration: &e%TIME_REMAINING%&f' + - '' + - '&c&lReason&f' + - '&7%REASON%&f' + - '' + - '&3&lAppeal Your Punishment&f' + - '&cWebsite: &7https://bebrashield.net&f' + - '&cDiscord: &7https://discord.gg/xsyy7d8RfG' + permission: + duration: '&cYou may not do this for &e%DURATION%&c.' + both: '&cYou may not do this to players and their IP addresses.' + uuid: '&cYou may not do this to players.' + ip-address: '&cYou may not do this to IP addresses.' + + + + # Messages for alt-checks and alt account notifications + # + # Before configuring this section, it is necessary to look at the address-enforcement + # settings in the main config.yml and understand the different kinds of alt detection. + # There is normal and strict detection. +alts: + auto-show: + # The message to display atop the alt check. Set to an empty string to disable + header: + - '&c&o%TARGET%&7 may be an alt account. Report follows.&f' + - '&7Strong possibility - Same address as banned player.&f' + - '&7Mere possibility - Linked to banned player by common past address' + + formatting: + # In the alt-check layout, the username of the alt may be formatted depending upon whether it is banned + # For example, the usernames of banned alts may be colored red whereas alts not banned are green + # Variables: %USERNAME% + name-display: + not-punished: '&o%USERNAME%' + muted: '&e&o%USERNAME%' + banned: '&c&o%USERNAME%' + + # The description for an alt account detected by strict detection. + strict: '&eMere possibility' + # How a single detected alt should be displayed + # Available variables: + # %DETECTION_KIND% - how the account was detected. Will be replaced by the normal or strict options. + # %ADDRESS% - the address in question which led to the detection + # %RELEVANT_USER% - the username of the other account, formatted according to the name-display option + # %RELEVANT_USERID% - the uuid of the other account + # %DATE_RECORDED% - the date the alt account was recorded + layout: '%RELEVANT_USER% &7(per %ADDRESS%) at %DATE_RECORDED% - %DETECTION_KIND%' + # The description for an alt account detected by normal detection. + normal: '&cStrong possibility' + + # Regarding the /alts command + command: + none-found: '&7No alt accounts found' + usage: '&cUsage: /alts &e&c.' + # The message to display atop the alt check. Set to an empty string to disable + header: + - '&7Alt account report for &c&o%TARGET%&7 follows.&f' + - '&7Strong possibility - Same address as banned player.&f' + - '&7Mere possibility - Linked to banned player by common past address' + permission: '&cYou may not check alts.' + + + # Used for /banlist, /mutelist, /history, /warns, /blame +lists: + ban-list: + perPage: 10 + noPages: '&7There are no active bans.' + maxPages: '&7Page &e%PAGE%&7 does not exist.' + permission: + command: '&7You may not view the banlist.' + + layout: + header: + - '&7[&eID&7] &e&oSubject&f' + - '&7Operator &8/ &7Reason &8/ &7Time Remaining&f' + body: + - '&7[&e%ID%&7] &e&o%VICTIM%&f' + - '&7%OPERATOR% &8/ &7%REASON% &8/ &7%TIME_REMAINING%&f' + footer: '&7Page &e%PAGE%&7.||ttp:Click for next page||cmd:/libertybans banlist %NEXTPAGE%' + + usage: '&cUsage: /banlist &e[page]' + + mute-list: + perPage: 10 + noPages: '&7There are no active mutes.' + maxPages: '&7Page &e%PAGE%&7 does not exist.' + permission: + command: '&7You may not view the mutelist.' + + layout: + header: + - '&7[&eID&7] &e&oSubject&f' + - '&7Operator &8/ &7Reason &8/ &7Time Remaining&f' + body: + - '&7[&e%ID%&7] &e&o%VICTIM%&f' + - '&7%OPERATOR% &8/ &7%REASON% &8/ &7%TIME_REMAINING%&f' + footer: '&7Page &e%PAGE%&7.||ttp:Click for next page||cmd:/libertybans mutelist %NEXTPAGE%' + + usage: '&cUsage: /mutelist &e[page]' + + warns: + perPage: 10 + noPages: '&c&o%TARGET%&7 has no warns.' + maxPages: '&7Page &e%PAGE%&7 does not exist.' + permission: + command: '&7You may not view warns.' + + layout: + header: '&7[&eID&7] Operator &8/ &7Reason &8/ &7Time Remaining&f' + body: '&7[&e%ID%&7] %OPERATOR% &8/ &7%REASON% &8/ &7%TIME_REMAINING%&f' + footer: '&7Page &e%PAGE%&7.||ttp:Click for next page||cmd:/libertybans warns %TARGET% %NEXTPAGE%' + + usage: '&cUsage: /warns &e [page]' + + blame: + perPage: 10 + noPages: '&c&o%TARGET%&7 has not punished any players.' + maxPages: '&7Page &e%PAGE%&7 does not exist.' + permission: + command: '&7You may not use blame.' + + layout: + header: + - '&7[&eID&7] &e&oSubject &8/ &7Punishment Type&f' + - '&7Reason &8/ &7Date Enacted&f' + body: + - '&7[&e%ID%&7] &e&o%VICTIM% &8 / &7%TYPE%&f' + - '&7%REASON% &8/ &7%START_DATE%&f' + footer: '&7Page &e%PAGE%&7.||ttp:Click for next page||cmd:/libertybans warns %TARGET% %NEXTPAGE%' + + usage: '&cUsage: /blame &e [page]' + + history: + perPage: 10 + noPages: '&c&o%TARGET%&7 has no history.' + maxPages: '&7Page &e%PAGE%&7 does not exist.' + permission: + command: '&7You may not view history.' + + layout: + header: + - '&7[&eID&7] &8/ &7Punishment Type&f' + - '&7Operator &8/ &7Reason &8/ &7Date Enacted&f' + body: + - '&7[&e%ID%&7] / %TYPE%&f' + - '&7%OPERATOR% &8/ &7%REASON% &8/ &7%START_DATE%&f' + footer: '&7Page &e%PAGE%&7.||ttp:Click for next page||cmd:/libertybans history %TARGET% %NEXTPAGE%' + + usage: '&cUsage: /history &e [page]' + + + # Specific formatting options +formatting: + # There are 2 ways to make permanent punishments. The first is to not specify a time (/ban ). + # The second is to specify a permanent amount of time (/ban perm ). + # When typing commands, what time arguments will be counted as permanent? + permanent-arguments: + - 'perm' + - 'permanent' + - 'permanently' + # How should 'permanent' be displayed as a length of time? + permanent-display: + # What do you call a permanent duration? + duration: 'Infinite' + # When does a permanent punishment end? + absolute: 'Never' + # How do you describe the time remaining in a permanent punishment? + relative: 'Permanent' + + # When there is no more time remaining in a punishment (the punishment has expired), + # this becomes the value of the %TIME_REMAINING% variable + no-time-remaining-display: 'N/A' + # How should the %HAS_EXPIRED% variable be displayed? + punishment-expired-display: + # How do you describe a punishment which is not expired? + not-expired: 'Not expired' + # How do you describe an expired punishment? + expired: 'Expired' + + # Controls how the %TRACK%, %TRACK_ID%, and %TRACK_NAMESPACE% variables are displayed + track-display: + # How do you describe the lack of an escalation track? + # The value will be displayed for the %TRACK% variable + no-track: 'No track' + # How do you describe the lack of an escalation track with respect to its ID? + # The value will be displayed for the %TRACK_ID% variable + no-track-id: 'No track ID' + # How do you describe the lack of an escalation track with respect to its namespace? + # The value will be displayed for the %TRACK_NAMESPACE% variable + no-track-namespace: '(none)' + # You may wish to override the track display names. Normally the track ID is displayed, + # which is lowercase and stored in the database. If you want a different name to be displayed + # for the track, write it here. + # + # This option affects the %TRACK% variable but not the %TRACK_ID% variable. + track-display-names: + spam: 'Spamming' + hacking: 'Hacking' + + + # How should the console be displayed? + console-display: 'Console' + # When using /blame, how should the console be specified? + console-arguments: + - 'console' + # How should punishment types be displayed? + punishment-type-display: + WARN: 'Warn' + KICK: 'Kick' + BAN: 'Ban' + MUTE: 'Mute' + + # How should punishment types be displayed as a verb? Used for the %TYPE_VERB% variable. + punishment-type-verb-display: + WARN: 'Warned' + KICK: 'Kicked' + BAN: 'Banned' + MUTE: 'Muted' + + # How should the global scope be displayed? + global-scope-display: 'All servers' + # Controls how victims are displayed + victim-display: + # In rare cases, you may have punishments for a user whose name is unknown. This can happen because + # users are punished by UUID, but on some configurations it is not possible to lookup player names. + # When this occurs, the following text is used instead of the player name. + player-name-unknown: '-NameUnknown-' + # Whether to censor IP addresses for players without the libertybans.admin.viewips permission + censor-ip-addresses: false + # The substitute text when an IP address cannot be viewed because the user lacks permission + censored-ip-address: '' + + +misc: + unknown-error: '&cAn unknown error occurred.' + # Only applicable if synchronous enforcement strategy is DENY in the main config + sync-chat-denial-message: '&cSynchronous chat denied. &7Please try again.' + # Concerns formatting of relative times and durations + time: + # Times are formatted to seconds accuracy, but you may not want to display seconds + # for most times. However, for very small durations, you need to display a value in seconds. + # If you are using SECONDS in the above section, this value is meaningless. + fallback-seconds: '%VALUE% seconds' + grammar: + # If enabled, places commas after each time fragment, except the last one + comma: true + # What should come before the last fragment? Set to empty text to disable + and: 'and ' + + fragments: + MINUTES: '%VALUE% minutes' + MONTHS: '%VALUE% months' + DAYS: '%VALUE% days' + HOURS: '%VALUE% hours' + YEARS: '%VALUE% years' + WEEKS: '%VALUE% weeks' + + + + # Regards /unban, /unmute, /unwarn +removals: + mutes: + success: + message: '&7Unmuted &c&o%VICTIM%&7.' + notification: '&c&o%UNOPERATOR%&7 unmuted &c&o%VICTIM%&7.' + + not-found: '&c&o%TARGET%&7 is not muted.' + usage: '&cUsage: /unmute &e&c.' + permission: + both: '&cYou may not do this to players and their IP addresses.' + uuid: '&cYou may not do this to players.' + ip-address: '&cYou may not do this to IP addresses.' + + + warns: + not-a-number: '&c&o%ID_ARG%&7 is not a number.' + success: + message: '&7Unwarned &c&o%VICTIM%&7.' + notification: '&c&o%UNOPERATOR%&7 unwarned &c&o%VICTIM%&7.' + + not-found: '&c&o%TARGET%&7 does not have a warn by &c&o%ID%&7.' + usage: '&cUsage: /unwarn &e &c.' + permission: + both: '&cYou may not do this to players and their IP addresses.' + uuid: '&cYou may not do this to players.' + ip-address: '&cYou may not do this to IP addresses.' + + + bans: + success: + message: '&7Unbanned &c&o%VICTIM%&7.' + notification: '&c&o%UNOPERATOR%&7 unbanned &c&o%VICTIM%&7.' + + not-found: '&c&o%TARGET%&7 is not banned.' + usage: '&cUsage: /unban &e&c.' + permission: + both: '&cYou may not do this to players and their IP addresses.' + uuid: '&cYou may not do this to players.' + ip-address: '&cYou may not do this to IP addresses.' + + + +admin: + ellipses: '&a...' + reloaded: '&aReloaded' + reload-failed: '&cAn error occurred reloading the configuration. Please check the server console.' + restarted: '&aRestarted' + addons: + reload-addon: + does-not-exist: '&cThat addon does not exist.' + failed: '&cAn error occurred reloading addon configuration. Please check the server console.' + usage: '&cUsage: /libertybans addon reload . To reload all addons, /libertybans reload will suffice.' + success: '&aReloaded addon &e%ADDON%&a.' + + listing: + message: '&b&lAddons Installed' + layout: '&7- %ADDON%' + + usage: '&cUsage: /libertybans addon ' + + no-permission: '&cSorry, you cannot use this.' + importing: + # To prevent mistakes, it is not allowed to import multiple times at once. + in-progress: '&cThere is already an import in progress.' + usage: '&cUsage: /libertybans import ' + failure: '&cImport failed. View the server console for details.' + started: '&7Import has started. View your server console for details and progress.' + complete: '&7Import completed.' + + +all: + # If a player types /libertybans but does not have the permission 'libertybans.commands', this is the denial message + base-permission-message: '&cYou may not use this.' + prefix: + # The prefix to use + value: '&6&lLibertyBans &8»&7 ' + # If enabled, all messages will be prefixed + enable: true + + # This section is only relevant if using the server scopes feature + scopes: + no-permission-for-default: '&cYou may not use this command without specifying a scope.' + no-permission: '&cYou may not use scope &e%SCOPE%&c.' + invalid: '&cInvalid scope specified: &e%SCOPE_ARG%&c.' + + # When issuing commands, if the specified player or IP was not found, what should the error message be? + not-found: + player-or-address: '&c&o%TARGET%&7 was not found online or offline, and is not a valid IP address.' + uuid: '&c&o%TARGET%&7 is not a valid uuid.' + player: '&c&o%TARGET%&7 was not found online or offline.' + + usage: '&cUnknown sub command. Displaying usage:' + diff --git a/src/plugins/LibertyBans/lang/messages_ru.yml b/src/plugins/LibertyBans/lang/messages_ru.yml new file mode 100644 index 0000000..9bc0561 --- /dev/null +++ b/src/plugins/LibertyBans/lang/messages_ru.yml @@ -0,0 +1,438 @@ +# +# Messages configuration +# +# +# In most cases, the variables inside the default messages are those available +# in that specific message. The exception to this is messages which are related +# to a certain punishment. +# +# When message has an associated punishment, multiple variables are available: +# +# %ID% - punishment ID number +# %TYPE% - punishment type, e.g. 'Ban' +# %TYPE_VERB% - punishment type as a verb, e.g. 'Banned' +# %VICTIM% - display name of the victim of the punishment +# %VICTIM_ID% - internal identifier of victim +# %OPERATOR% - display name of the staff member who made the punishment +# %OPERATOR_ID% - internal identifier of the operator +# %UNOPERATOR% - staff member undoing the punishment. available only when the punishment is undone +# %UNOPERATOR_ID% - internal identifier of staff member undoing the punishment +# %REASON% - reason for the punishment +# %SCOPE% - scope of the punishment +# %DURATION% - original duration (how long the punishment was made for) +# %START_DATE% - the date the punishment was created +# %TIME_PASSED% - the time since the punishment was created +# %TIME_PASSED_SIMPLE% - the time since the punishment was created, rounded to the biggest time unit possible (e.g. 2 months instead of 1 month 23 days) +# %END_DATE% - the date the punishment will end, or formatting.permanent-display.absolute for permanent punishments +# %TIME_REMAINING% - the time until the punishment ends, or formatting.permanent-display.relative for permanent punishments +# %TIME_REMAINING_SIMPLE% - the time until the punishment ends, rounded to the biggest time unit possible (e.g. 10 days instead of 9 days 13 hours) +# %HAS_EXPIRED% - Shows if a punishments duration has run out. Does not check if the punishment is revoked! +# +# The following variables have limited availability: +# %TARGET% - the original target argument of a command. For example, in '/ipban Player1', %TARGET% is Player1 +# %NEXTPAGE% - the number of the next page of a list like history +# %PREVIOUSPAGE% - the number of the previous page of a list like history +# +# +# Used for /banlist, /mutelist, /history, /warns, /blame +lists: + warns: + perPage: 10 + noPages: '&c&o У %TARGET%&7 нету варнов.' + maxPages: '&7Страницы &e%PAGE%&7 не существует.' + permission: + command: '&7У вас нету прав использовать эту команду.' + + layout: + header: '&7[&eID&7] Обвиняющий &8/ &7Причина &8/ &7До снятия' + body: '&7[&e%ID%&7] %OPERATOR% &8/ &7%REASON% &8/ &7%TIME_REMAINING%' + footer: '&7Страница &e%PAGE%&7.||ttp:Следующая страница||cmd:/libertybans warns %TARGET% %NEXTPAGE%' + + usage: '&cИспользование: /warns &e<игрок> [страница]' + + blame: + perPage: 10 + noPages: '&c&o%TARGET%&7 не наказывал игроков.' + maxPages: '&7Страницы &e%PAGE%&7 не существует.' + permission: + command: '&7У вас нету права использовать эту команду.' + + layout: + header: + - '&7[&eID&7] &e&oНаказуемый &8/ &7Вид наказания&f' + - 'Причина &8/ &7Дата принятия' + body: + - '&7[&e%ID%&7] &e&o%VICTIM% &8 / &7%TYPE%&f' + - '%REASON% &8/ &7%START_DATE%' + footer: '&7Страница &e%PAGE%&7.||ttp:Следующая страница||cmd:/libertybans warns %TARGET% %NEXTPAGE%' + + usage: '&cИспользование: /blame &e<игрок> [страница]' + + ban-list: + perPage: 10 + noPages: '&7Нету активных банов.' + maxPages: '&7Страницы &e%PAGE%&7 не существует.' + permission: + command: '&7У вас нету права на использование этой команды.' + + layout: + header: + - '&7[&eID&7] &e&oНаказуемый&f' + - '&7Обвиняющий &8/ &7Причина &8/ &7Осталось времени' + body: + - '&7[&e%ID%&7] &e&o%VICTIM%&f' + - '&7%OPERATOR% &8/ &7%REASON% &8/ &7%TIME_REMAINING%' + footer: '&7Страница &e%PAGE%&7.||ttp:Следующая страница||cmd:/libertybans banlist %NEXTPAGE%' + + usage: '&cИспользование: /banlist &e[страница]' + + mute-list: + perPage: 10 + noPages: '&7Нету активных мутов.' + maxPages: '&7Страницы &e%PAGE%&7 не существует.' + permission: + command: '&7У вас нету права на эту команду' + + layout: + header: + - '&7[&eID&7] &e&oНаказуемый&f' + - '&7Обвиняющий &8/ &7Причина &8/ &7Осталось времени' + body: + - '&7[&e%ID%&7] &e&o%VICTIM%&f' + - '&7%OPERATOR% &8/ &7%REASON% &8/ &7%TIME_REMAINING%' + footer: '&7Страница &e%PAGE%&7.||ttp:Следующая страница||cmd:/libertybans mutelist %NEXTPAGE%' + + usage: '&cИспользование: /mutelist &e[страница]' + + history: + perPage: 10 + noPages: '&c&o%TARGET%&7 чист.' + maxPages: '&7Страницы &e%PAGE%&7 не существует.' + permission: + command: '&7У вас нету права на использование данной команды.' + + layout: + header: + - '&7[&eID&7] &8/ &7Вид наказания&f' + - 'Обвиняющий &8/ &7Причина &8/ &7Дата' + body: + - '&7[&e%ID%&7] / %TYPE%&f' + - '%OPERATOR% &8/ &7%REASON% &8/ &7%START_DATE%' + footer: '&7Страница &e%PAGE%&7.||ttp:Следуюшая страница||cmd:/libertybans history %TARGET% %NEXTPAGE%' + + usage: '&cИспользование: /history &e<игрок> [страница]' + + +all: + # When issuing commands, if the specified player or IP was not found, what should the error message be? + not-found: + player-or-address: '&c&o%TARGET%&7 не был/было найден(o).' + uuid: '&c&o%TARGET%&7 - неправильный формат uuid.' + player: '&c&o%TARGET%&7 не был найден.' + + # If a player types /libertybans but does not have the permission 'libertybans.commands', this is the denial message + base-permission-message: '&cТы уверен, что оно тебе нужно? К слову, права на эту команду у тебя нет.' + prefix: + # If enabled, all messages will be prefixed + enable: true + # The prefix to use + value: '&6&lLibertyBans &8»&7 ' + + usage: '&cНеизвестная подкоманда. Может ты имел ввиду это?' + + # + # Messages regarding /ban, /mute, /warn, /kick + # Includes punishment layouts + # + # +additions: + warns: + success: + notification: '&c&o%OPERATOR%&7 выдал варн &c&o%VICTIM%&7 на &a&o%DURATION%&7 по причине &e&o%REASON%&7.' + message: '&c&o%VICTIM%&a получил варн на &o%DURATION%&r&a по причине &e&o%REASON%&a.' + + usage: '&cИспользование: /warn &e<игрок> [время] <причина>&c.' + layout: + - '&7&lВы получили варн!&f' + - '&cДлительность: &e%TIME_REMAINING%&f' + - '' + - '&cПричина:&f' + - '&7%REASON%' + permission: + duration: '&cВам нельзя варнить игроков на &e%DURATION%&c.' + both: '&cYou may not do this to players and their IP addresses.' + uuid: '&cВам нельзя варнить других игроков.' + ip-address: '&cВам нельзя варнить по ip-адресу.' + + + kicks: + success: + notification: '&c&o%OPERATOR%&7 кикнул &c&o%VICTIM%&7 по причине &e&o%REASON%&7.' + message: '&c&o%VICTIM%&a был кикнут по причине &e&o%REASON%&a.' + + must-be-online: '&c&o%TARGET%&7 must be online.' + usage: '&cИспользование: /kick &e<игрок> <причина>&c.' + layout: + - '&7&lВас кикнули!&f' + - '' + - '&cПричина:&f' + - '&7%REASON%' + permission: + both: '&cВам нельзя кикать игроков.' + uuid: '&cВам нельзя кикать игроков по uuid/нику.' + ip-address: '&cВам нельзя кикать по ip-адресу.' + + + bans: + conflicting: '&c&o%TARGET%&7 уже заблокирован.' + success: + notification: '&c&o%OPERATOR%&7 заблокировал &c&o%VICTIM%&7 на &a&o%DURATION%&7 по причине &e&o%REASON%&7.' + message: '&c&o%VICTIM%&a заблокирован на &o%DURATION%&r&a по причине &e&o%REASON%&a.' + + usage: '&cИспользование: /ban &e<игрок> [длительность] <причина>&c.' + layout: + - '&7&lВы заблокированы на этом сервере.&f' + - '&cДлительность бана: &e%TIME_REMAINING%&f' + - '' + - '&cПричина&f' + - '&7%REASON%&f' + - '' + - '&3По поводу разбана пишите в тех.поддержку:&f' + - '&cwww.support.com' + permission: + duration: '&cТебе нельзя банить на &e%DURATION%&c.' + both: '&cВы не можете блокировать игроков.' + uuid: '&cВы не можете банить игроков по uuid/нику.' + ip-address: '&cВы не можете банить игроков по ip!.' + + + mutes: + conflicting: '&c&o%TARGET%&7 уже заглушён.' + success: + notification: '&c&o%OPERATOR%&7 заглушил &c&o%VICTIM%&7 на &a&o%DURATION%&7 по причине &e&o%REASON%&7.' + message: '&c&o%VICTIM%&a заглушён на &o%DURATION%&r&a по причине &e&o%REASON%&a.' + + usage: '&cИспользование: /mute &e<игрок> [длительность] <причина>&c.' + layout: + - '&7&lВы получили мут!&f' + - '&cДлительность: &e%TIME_REMAINING%&f' + - '' + - '&cПричина:&f' + - '&7%REASON%' + permission: + duration: '&cВам нельзя мутить на &e%DURATION%&c.' + both: '&cВы не можете мутить игроков.' + uuid: '&cВы не можете мутить игроков по uuid/нику.' + ip-address: '&cВы не можете мутить игроков по ip-адресу.' + + + + # Regards /unban, /unmute, /unwarn +removals: + warns: + success: + notification: '&c&o%UNOPERATOR%&7 снял предупреждение с &c&o%VICTIM%&7.' + message: '&7C &c&o%VICTIM% &7снято предупреждение.' + + not-found: 'У &c&o%TARGET%&7 нету предупреждений с id &c&o%ID%&7.' + not-a-number: '&c&o%ID_ARG%&7 не является номером.' + usage: '&cИспользование: /unwarn &e<игрок> &c.' + permission: + both: '&cВы не можете снимать предупреждения.' + uuid: '&cВы не можете снимать предупрежедния по uuid/нику.' + ip-address: '&cВы не можете снимать предупреждения по ip-адресу.' + + + bans: + success: + notification: '&c&o%UNOPERATOR%&7 разбанил &c&o%VICTIM%&7.' + message: '&7Снят бан с аккаунта &c&o%VICTIM%&7.' + + not-found: '&c&o%TARGET%&7 не заблокирован.' + usage: '&cИспользование: /unban &e<игрок>&c.' + permission: + both: '&cВы не можете разбанивать игроков..' + uuid: '&cВы не можете разбанивать игроков по uuid/нику.' + ip-address: '&cВы не можете разбанивать игроков по ip-адресу.' + + + mutes: + success: + notification: '&c&o%UNOPERATOR%&7 размутил &c&o%VICTIM%&7.' + message: '&7С &c&o%VICTIM%&7 снят мут.' + + not-found: '&c У &o%TARGET%&7 нету мута.' + usage: '&cИспользование: /unmute &e<игрок>&c.' + permission: + both: '&cYou may not do this to players and their IP addresses.' + uuid: '&cВам нельзя размучивать других игроков.' + ip-address: '&cВам нельзя размучивать по ip-адрессу.' + + + + # Specific formatting options +formatting: + # When using /blame, how should the console be specified? + console-arguments: + - 'console' + # How should 'permanent' be displayed as a length of time? + permanent-display: + # When does a permanent punishment end? + absolute: 'Никогда' + # What do you call a permanent duration? + duration: 'Бесконечное' + # How do you describe the time remaining in a permanent punishment? + relative: 'Навеки вечные' + + # When there is no more time remaining in a punishment (the punishment has expired), + # this becomes the value of the %TIME_REMAINING% variable + no-time-remaining-display: 'N/A' + # How should the %HAS_EXPIRED% variable be displayed? + punishment-expired-display: + # How do you describe an expired punishment? + expired: 'Более неактивен' + # How do you describe a punishment which is not expired? + not-expired: 'Активен' + + # How should the console be displayed? + console-display: 'Консоль' + # How should punishment types be displayed? + punishment-type-display: + WARN: 'Предупрежедние' + MUTE: 'Мут' + KICK: 'Кик' + BAN: 'Бан' + + # How should punishment types be displayed as a verb? Used for the %TYPE_VERB% variable. + punishment-type-verb-display: + WARN: 'Предупрежден' + KICK: 'Кикнут' + MUTE: 'Заглушен' + BAN: 'Заблокирован' + + # How should the global scope be displayed? + global-scope-display: 'Все сервера' + # There are 2 ways to make permanent punishments. The first is to not specify a time (/ban ). + # The second is to specify a permanent amount of time (/ban perm ). + # When typing commands, what time arguments will be counted as permanent? + permanent-arguments: + - 'perm' + - 'permanent' + - 'permanently' + +misc: + # Concerns formatting of relative times and durations + time: + grammar: + # What should come before the last fragment? Set to empty text to disable + and: 'и ' + # If enabled, places commas after each time fragment, except the last one + comma: true + + # Times are formatted to seconds accuracy, but you may not want to display seconds + # for most times. However, for very small durations, you need to display a value in seconds. + # If you are using SECONDS in the above section, this value is meaningless. + fallback-seconds: '%VALUE% секунд(ы)' + fragments: + MONTHS: '%VALUE% месяцев' + MINUTES: '%VALUE% минут(ы)' + WEEKS: '%VALUE% недель' + HOURS: '%VALUE% час(а/ов)' + DAYS: '%VALUE% дней' + YEARS: '%VALUE% лет' + + + unknown-error: '&cПроизошла неизвестная ошибка.' + # Only applicable if synchronous enforcement strategy is DENY in the main config + sync-chat-denial-message: '&cСинхронный чат отключён. &7Попробуйте еще раз позже.' + +admin: + importing: + failure: '&cИмпорт данных завершился! Больше информации в консоли.' + started: '&7Импорт данных закончился неудачей. Больше информации в консоли.' + complete: '&7Импорт данных успешно завершён.' + # To prevent mistakes, it is not allowed to import multiple times at once. + in-progress: '&cИмпорт данных уже запущен! Пожалуйста, дождитесь его окончания.' + usage: '&cИспользование: /libertybans import ' + + ellipses: '&a...' + reloaded: '&aПерезагружено' + restarted: '&aПерезапущено' + no-permission: '&Извините, но вам не дозволено использовать это.' + + # Messages for alt-checks and alt account notifications + # + # Before configuring this section, it is necessary to look at the address-enforcement + # settings in the main config.yml and understand the different kinds of alt detection. + # There is normal and strict detection. +alts: + # Regarding the /alts command + command: + # The message to display atop the alt check. Set to an empty string to disable + header: + - '&7Возможные фейковые аккаунты игрока &c&o%TARGET%&f' + - '&7Большая вероятность - У игрока тот же адресс, что и у заблокированного игрока.&f' + - '&7Небольшая вероятность - У игроков один и тот же предыдущий адрес.' + permission: '&cВам не дозволено проверять твинки.' + none-found: '&7Не найдено фейковых аккаунтов.' + usage: '&cИспользование: /alts &e<игрок>&c.' + + formatting: + # The description for an alt account detected by strict detection. + strict: '&eНебольшая вероятность' + # The description for an alt account detected by normal detection. + normal: '&cБольшая вероятность' + # In the alt-check layout, the username of the alt may be formatted depending upon whether it is banned + # For example, the usernames of banned alts may be colored red whereas alts not banned are green + # Variables: %USERNAME% + name-display: + not-punished: '&o%USERNAME%' + banned: '&c&o%USERNAME%' + muted: '&e&o%USERNAME%' + + # How a single detected alt should be displayed + # Available variables: + # %DETECTION_KIND% - how the account was detected. Will be replaced by the normal or strict options. + # %ADDRESS% - the address in question which led to the detection + # %RELEVANT_USER% - the username of the other account, formatted according to the name-display option + # %RELEVANT_USERID% - the uuid of the other account + # %DATE_RECORDED% - the date the alt account was recorded + layout: '%RELEVANT_USER% &7(%ADDRESS%) на %DATE_RECORDED% - %DETECTION_KIND%' + + auto-show: + # The message to display atop the alt check. Set to an empty string to disable + header: + - 'Возможно, &c&o%TARGET%&7. - фейковый аккаунт.&f' + - '&7Большая вероятность - У игрока тот же адрес, что и у заблокированного игрока.&f' + - '&7Небольшая вероятность - У игроков один и тот же предыдущий адрес.' + + + # Configuration for the /accounthistory command +account-history: + # Pertains to /accounthistory delete + delete: + permission: '&cВы не можете удалять записанные аккаунты.' + no-such-account: '&c У %TARGET% не было записанных акаунтов в тот момент времени.' + usage: + - '&cИспользование: /accounthistory delete <пользователь> <момент времент>.&f' + - '&7Момент времени измеряется в секундах. Вы можете использовать /accounthistory list для того, чтобы подглядеть возможные значения.' + success: '&7Записанный у &e%TARGET% &7аккаунт успешно удалён.' + + # Regards /accounthistory list + listing: + # The message to display before the account listing. Set to an empty string to disable + header: '&7Известные аккаунты у &c&o%TARGET%&7:.' + permission: '&cВы не можете просматривать записанные аккаунты.' + none-found: '&7Не найдено записанных акаунтов.' + usage: '&cИспользование: /accounthistory list ' + # How a single recorded account should be displayed + # Available variables: + # %TARGET% - the original input to the command + # %USERNAME% - the username the player connected with + # %ADDRESS% - the address the player connected with + # %DATE_RECORDED% - the date the join was recorded + # %DATE_RECORDED_RAW% - the raw timestamp the join was recorded + layout: '%USERNAME% &7(%ADDRESS%) на %DATE_RECORDED% (%DATE_RECORDED_RAW%)||ttp:&7Нажми здесь, чтобы удалить аккаунт||cmd:/accounthistory delete %TARGET% %DATE_RECORDED_RAW%' + + usage: '&cИспользование: /accounthistory ' + diff --git a/src/plugins/LibertyBans/scope.yml b/src/plugins/LibertyBans/scope.yml new file mode 100644 index 0000000..23c5ef7 --- /dev/null +++ b/src/plugins/LibertyBans/scope.yml @@ -0,0 +1,48 @@ + # This file is for proxies like BungeeCord and Velocity. It is irrelevant for single servers. + # It controls scope-related settings for this particular server on the network. + # + # Unlike other configuration files, one should NOT copy the scope.yml across multiple server instances + # Whether to require permissions for using scopes: + # - libertybans.scope.global, libertybans.scope.server., and libertybans.scope.category. + # become requirements to use the relevant scopes explicitly. + # - libertybans.scope.default must be granted to use commands without a scope argument +require-permissions: false + # The default scope used to punish players + # + # GLOBAL - uses the global scope + # THIS_SERVER - applies to this server only via the server name + # PRIMARY_CATEGORY - uses the first category listed in 'categories-applicable-to-this-server'. + # + # If you use PRIMARY_CATEGORY but no categories are configured, a warning is printed and THIS_SERVER is used. +default-punishing-scope: 'GLOBAL' + # The scope categories applicable to this server + # + # For example, multiple servers might fall under the 'kitpvp' category, + # then staff members may use '-category=kitpvp' to create punishment applying to these servers +categories-applicable-to-this-server: [] + # Controls how the name of this server is detected for use with the server scope. + # + # The server name should correspond to the name of the backend server as configured on the proxy. + # The name of the proxy itself is 'proxy' by default, unless overridden. +server-name: + # Auto detection requires a player to have logged in. But you might punish players, e.g. via console, before that. + # By default, if auto detection has not yet occurred, the global scope will be used as a fallback. + # The fallback scope may be configured here to something else. + fallback-if-auto-detect-fails: '*' + # By default, we try to detect the name of this backend server using plugin messaging. + # Make sure 'use-plugin-messaging' is enabled in the config.yml for this detection to succeed. + # + # If running a proxy, the detected name becomes 'proxy'. + # + # Plugin messaging requires at least one player to have logged into the backend server. + # Auto detection may fail, for example, if you ban someone through the console but no one has joined yet. + # + # To disable auto detection, set this to false then configure 'override-value' to the server name you wish to use. + # Re-enabling this option may require a restart (/libertybans restart) + auto-detect: true + # If auto detection is disabled, this option should be set to the name of the server. + # + # Server names should be unique, but this is not a strict requirement. + # If you want a scope applying to multiple servers, you should use categories instead. + override-value: 'myserver' + diff --git a/src/plugins/LibertyBans/sql.yml b/src/plugins/LibertyBans/sql.yml new file mode 100644 index 0000000..85f0617 --- /dev/null +++ b/src/plugins/LibertyBans/sql.yml @@ -0,0 +1,119 @@ + # + # SQL Database settings + # + # For most servers, the default options here are perfect. Most users will not need to bother here. + # + # However, for servers wishing to use an external database, or for large servers wishing to tweak performance, + # further configuration is made here. + # + # Database version requirements: + # - MariaDB: Requires MariaDB 10.6 or newer. + # - MySQL: Requires MySQL 8.0 or newer. + # - PostgreSQL: Requires PostgreSQL 12 or newer. + # - CockroachDB: Requires the latest version. Support for this database is experimental. + # + # Older versions of these respective databases are not supported. + # + # Information on character sets and encoding: + # - MariaDB: UTF8 is configured automatically + # - MySQL: UTF8 is configured automatically + # - PostgreSQL: UTF8 is used for the client encoding. It may be necessary to configure the database collation to use UTF8. + # - CockroachDB: This database uses UTF8 regardless. + # + # Note well: + # To apply changes made here, use '/libertybans restart' or restart the server. + # Using '/libertybans reload' will NOT update your database settings! + # + # + # + # Settings for synchronizing multiple LibertyBans instances. +synchronization: + # How frequently the database is polled for updates, in milliseconds. + # Usually the default setting of 4 seconds will be sufficiently responsive without querying the database too often + # If you want to increase responsiveness, lower this value. If you want to reduce database load, increase this value. + # + # This value MUST be less than 30 seconds. + poll-rate-millis: 4000 + # Availalble synchronization options: + # NONE - no synchronization + # ANSI_SQL - uses your database to synchronize punishments (called ANSI_SQL because it uses standard SQL) + # Other options may be added in the future, upon feature request. + mode: 'NONE' + + # All punishments are stored fully in the database, with one exception. + # Mutes are cached for a small period of time so that players' chatting does not + # flood your database with queries. + # + # Note: It is likely you do not need to touch this. +mute-caching: + # How the expiration time should be used. EXPIRE_AFTER_ACCESS is the default, + # which means that a cached mute's expiration time will be reset each time it is used. + # + # Set this to EXPIRE_AFTER_WRITE if there is any program or other instance of LibertyBans + # which may modify mutes in the database outside of this instance of LibertyBans. + # For example, if you are using a third-party tool which can delete or add mutes, + # EXPIRE_AFTER_WRITE is the correct semantic. + # + # If you are using multi-instance synchronization, this option is set automatically + # and you do not need to configure it. + # + # EXPIRE_AFTER_WRITE will expire the cached mute after a fixed time has elapsed + # since the mute was fetched. With EXPIRE_AFTER_ACCESS, the expiration time + # will refresh each time the mute is used. + expiration-semantics: 'EXPIRE_AFTER_ACCESS' + # How long it takes a mute to expire + expiration-time-seconds: 20 + + # + # Connection timeout settings + # LibertyBans uses HikariCP for connection pooling. The following settings control connection timeouts. +timeouts: + # How long, at maximum, should LibertyBans wait when acquiring new connections, if no existing connection is available? + connection-timeout-seconds: 14 + # How long, at maxium, should a connection in the pool last before having to be recreated? + # "This value should be set for MariaDB or MySQL. HikariCP notes: + # "It should be several seconds shorter than any database or infrastructure imposed connection time limit" + max-lifetime-minutes: 25 + + # Authentication details for remote databases: used for MariaDB, MySQL, PostgreSQL, and CockroachDB. +auth-details: + database: 'minecraft_db' + password: '0000' + user: 'minecraft' + host: '127.0.0.1' + port: 3306 + + # The values in this section only apply when using a MariaDB or MySQL database +mariadb: + # Connection properties to be applied to database connections + connection-properties: + cachePrepStmts: 'true' + useUnicode: 'true' + prepStmtCacheSqlLimit: '1024' + characterEncoding: 'UTF-8' + prepStmtCacheSize: '25' + useServerPrepStmts: 'true' + + + # The values in this section only apply when using a PostgreSQL or CockroachDB database +postgres: + # Connection properties to be applied to database connections + connection-properties: + preparedStatementCacheQueries: '25' + + + # Legacy option. Don't touch this unless you understand it or you're told to enable it. +use-traditional-jdbc-url: false + # What RDMS vendor will you be using? + # Available options: + # 'HSQLDB' - Local HyperSQL database. No additional requirements. + # 'MARIADB' - Requires an external MariaDB database. At least MariaDB 10.6 is required. + # 'MYSQL' - Requires an external MySQL database. At least MySQL 8.0 is required. + # 'POSTGRES' - Requires an external PostgreSQL database. At least PostgreSQL 12 is required. + # 'COCKROACH' - Requires an external CockroachDB database. The latest CockroachDB is required. Warning: this option is strictly experimental. +rdms-vendor: 'HSQLDB' + # + # How large should the connection pool be? + # A thread pool of similar size is derived from the connection pool size. + # For most servers, the default option is suitable. +connection-pool-size: 6 diff --git a/src/plugins/LibertyBans_Release-1.1.0.jar b/src/plugins/LibertyBans_Release-1.1.0.jar new file mode 100644 index 0000000..481684c --- /dev/null +++ b/src/plugins/LibertyBans_Release-1.1.0.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f13de2c1ff9e0d45190c647f958d8b6f9fe69d2322deef732624048be76f7d90 +size 275509 From a41d43cf19485b4ef3eaded5bf5b412cfb428ac6 Mon Sep 17 00:00:00 2001 From: Oznobys Date: Mon, 21 Jul 2025 23:05:59 +0300 Subject: [PATCH 2/3] feature-27-LibertyBans --- src/plugins/LibertyBans/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/LibertyBans/config.yml b/src/plugins/LibertyBans/config.yml index 2d83e2c..88a9a0f 100644 --- a/src/plugins/LibertyBans/config.yml +++ b/src/plugins/LibertyBans/config.yml @@ -132,7 +132,7 @@ player-uuid-resolution: # For most servers this will be 'ONLINE' # For offline servers where all players have offline UUIDs, use OFFLINE # For offline servers where some players have online and some have offline UUIDs, use MIXED - server-type: 'ONLINE' + server-type: 'OFFLINE' platforms: # Related to game servers such as Spigot, Paper, and Sponge From f1ba8bb55271f9675b035b09a38151e41a4a721f Mon Sep 17 00:00:00 2001 From: cuqmbr Date: Tue, 22 Jul 2025 22:14:58 +0300 Subject: [PATCH 3/3] add LibertyBans secret substitution --- .dockerignore | 1 - .gitignore | 1 - Dockerfile | 27 ++++++++++++++++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.dockerignore b/.dockerignore index c1689e1..80f5636 100644 --- a/.dockerignore +++ b/.dockerignore @@ -28,5 +28,4 @@ src/plugins/DiscordSRV/accounts.aof .crowdin src/plugins/PlasmoVoice/voice_mutes.json - src/plugins/LibertyBans/internal diff --git a/.gitignore b/.gitignore index df97e77..c539ec3 100644 --- a/.gitignore +++ b/.gitignore @@ -28,5 +28,4 @@ src/plugins/DiscordSRV/accounts.aof .crowdin src/plugins/PlasmoVoice/voice_mutes.json - src/plugins/LibertyBans/internal diff --git a/Dockerfile b/Dockerfile index cfd466e..f780e3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ ADD ./src ${CONFIG_PATH} RUN mkdir ${DATA_PATH} +# Add symlinks to Default Minecraft files RUN touch ${DATA_PATH}/banned-ips.json && \ ln -sf ${DATA_PATH}/banned-ips.json ${CONFIG_PATH} RUN touch ${DATA_PATH}/banned-players.json && \ @@ -27,6 +28,8 @@ RUN mkdir ${DATA_PATH}/world_nether && \ ln -sf ${DATA_PATH}/world_nether ${CONFIG_PATH} RUN mkdir ${DATA_PATH}/world_the_end && \ ln -sf ${DATA_PATH}/world_the_end ${CONFIG_PATH} + +# Add symlinks to Plasmo Voice files RUN touch ${DATA_PATH}/pv-voice_mutes.json && \ ln -sf ${DATA_PATH}/pv-voice_mutes.json \ ${CONFIG_PATH}/plugins/PlasmoVoice/voice_mutes.json @@ -39,17 +42,24 @@ ENV PROXY_SECRET=00000000-0000-0000-0000-000000000000 ENV VOICE_SECRET=00000000-0000-0000-0000-000000000000 +ENV LUCKPERMS_DB_HOST=127.0.0.1 +ENV LUCKPERMS_DB_PORT=3306 +ENV LUCKPERMS_DB_NAME=luckperms_db +ENV LUCKPERMS_DB_USERNAME=luckperms +ENV LUCKPERMS_DB_PASSWORD=0000 + ENV COREPROTECT_DB_HOST=127.0.0.1 ENV COREPROTECT_DB_PORT=3306 ENV COREPROTECT_DB_NAME=coreprotect_db ENV COREPROTECT_DB_USERNAME=coreprotect ENV COREPROTECT_DB_PASSWORD=0000 -ENV LUCKPERMS_DB_HOST=127.0.0.1 -ENV LUCKPERMS_DB_PORT=3306 -ENV LUCKPERMS_DB_NAME=luckperms -ENV LUCKPERMS_DB_USERNAME=luckperms -ENV LUCKPERMS_DB_PASSWORD=0000 +ENV LIBERTYBANS_DB_HOST=127.0.0.1 +ENV LIBERTYBANS_DB_PORT=3306 +ENV LIBERTYBANS_DB_NAME=libertybans_db +ENV LIBERTYBANS_DB_USERNAME=libertybans +ENV LIBERTYBANS_DB_PASSWORD=0000 + WORKDIR ${WORKDIR_PATH}/config @@ -76,5 +86,12 @@ CMD \ sed -i "s/_COREPROTECT_DB_USERNAME_/${COREPROTECT_DB_USERNAME}/g" plugins/CoreProtect/config.yml && \ sed -i "s/_COREPROTECT_DB_PASSWORD_/${COREPROTECT_DB_PASSWORD}/g" plugins/CoreProtect/config.yml && \ + # Add libertybans database secrets + sed -i "s/_LIBERTYBANS_DB_HOST_/${LIBERTYBANS_DB_HOST}/g" plugins/LibertyBans/sql.yml && \ + sed -i "s/_LIBERTYBANS_DB_PORT_/${LIBERTYBANS_DB_PORT}/g" plugins/LibertyBans/sql.yml && \ + sed -i "s/_LIBERTYBANS_DB_NAME_/${LIBERTYBANS_DB_NAME}/g" plugins/LibertyBans/sql.yml && \ + sed -i "s/_LIBERTYBANS_DB_USERNAME_/${LIBERTYBANS_DB_USERNAME}/g" plugins/LibertyBans/sql.yml && \ + sed -i "s/_LIBERTYBANS_DB_PASSWORD_/${LIBERTYBANS_DB_PASSWORD}/g" plugins/LibertyBans/sql.yml && \ + # Launch java -Xms${MEMORY} -Xmx${MEMORY} -jar *.jar -nogui